ajaxorg/ace — Issue #551: Feature request: Automatic text selection after using setValue()
Author: bananascript
Created: 2011-12-03 10:58:16+00:00
State: open

A nice feature would be to have parts of the text selected using some form of special markup in the text data sent to setValue().

Maybe something like editor.getSession().setValue('red {SELECTION}green{/SELECTION} blue'); which would output "red green blue" in the editor where the word "green" is selected.

This would be useful in WYSIWYG editors where you can select some text, an image or something else, switch to code view and have the corresponding HTML-code highlighted and centered in the middle of the screen.