Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert images #5525

Open
1 of 2 tasks
francoisschwarzentruber opened this issue Mar 29, 2024 · 2 comments
Open
1 of 2 tasks

Insert images #5525

francoisschwarzentruber opened this issue Mar 29, 2024 · 2 comments

Comments

@francoisschwarzentruber

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

@marinsokol5
Copy link
Contributor

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.

@marinsokol5
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants