Insert images
francoisschwarzentruber opened this issue · comments
Describe the feature
The idea would be to be able to insert images in at the current position of the caret. The image would have a special property so that the image is replaced by the text when we do editor.getValue()
Use Case
The typical use case would be to write programs with images in it.
Proposed Solution
`editor.insertDOMElement(element, "<>")
It is still unclear how to convert some part of the text into images when we do editor.setValue(....)
Other Information
This feature is present in the editor of the pedagogical tool DrRacket: https://docs.racket-lang.org/drracket/Graphical_Syntax.html
See pictures here: https://horstmann.com/unblog/2011-03-22/racket.html
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
ACE version used
latest
Hey,
It's definitely a nice suggestion.
It is very likely quite a big change in the product and codebase though, if at all possible, since Ace was intended to be a code editor.
It would be nice if we can add it as an extension (although unlikely), or we could probably hack it up via CSS through custom language modes.