rich-markdown-editor
rich-markdown-editor copied to clipboard
feat: Attachment of files as block to documents using s3
I added file upload feature. (outline commit is https://github.com/outline/outline/pull/2936)
It is almost same with what chanchadsahi, FeralMib did(#280 , #603 ).
The difference is that it is made form of a notice block.
And, I need some help. There are bad code here.
parseMarkdown() { return { block: "container_file", getAttrs: token => { const file_regex = /\[(?<alt>[^]*?)\]\((?<filename>[^]*?)\)/g; const result = file_regex.exec(token.info); return { src: result? result[2] : null, alt: result? result[1] : null, }; }, }; }
I want to place src(file url) and title variable in attributes but, I don't know how to do it.
Can anyone help this?