How to replace selected text

757 views
Skip to first unread message

ms.im...@gmail.com

unread,
Nov 11, 2013, 8:59:31 AM11/11/13
to ace-d...@googlegroups.com
Hi

I have a short question.
Is it possible to replace a selected text in the editor?

I want to select a text and with some different buttons I will change the selected text.

Thanks
Martin

Harutyun Amirjanyan

unread,
Nov 11, 2013, 1:15:35 PM11/11/13
to ace-d...@googlegroups.com
Hi
try
editor.session.replace(editor.selection.getRange(), "Hi")

ms.im...@gmail.com

unread,
Nov 12, 2013, 2:03:11 AM11/12/13
to ace-d...@googlegroups.com
Works like a charm ;)

Thank you.
Reply all
Reply to author
Forward
0 new messages