I’m trying to implement image upload in CodeMirror using widgets containing a file input.
I got the basics working, so far so good:
- Insert widget using
- File upload on file input change
- Replace the widget with markdown image
Now I’d like the widgets to behave like “inline block” content, moving down on newline and removed on backspace the an empty line below. But a
LineWidget is bound to the line, so it sticks to the line (as expected):
I’ve also tried using
setBookmark with a custom element but don’t think this work for me:
What would be the best approach here? Is LineWidget the way to go here?
Any help is appreciated!