How to bring up Default Search Box based a click on a button outside Ace Editor

17 views
Skip to first unread message

vanessa....@gmail.com

unread,
May 20, 2024, 6:30:16 PMMay 20
to Ajax.org Cloud9 Editor (Ace)
Hi,
How do I bring up Default Search Box using both Ctrl/Cmd + F and a click on a button outside Ace Editor. By default, Ace Search Box/Dialog is bound to Ctrl/Cmd + F key. However, that is not very discoverable as having a Search button outside Ace Editor. Some times, people do not know that they need to using Ctrl/Cmd + F key to bring up the Search box.

How would I bind that Search button to the displaying of the Ace Editor's Search box? Thanks,
Vanessa

vanessa....@gmail.com

unread,
May 23, 2024, 3:05:34 AMMay 23
to Ajax.org Cloud9 Editor (Ace)
Never mind. I figured out.
const aceEditor = this.getAceEditor();
if (!(<any>aceEditor).searchBox) {
(<any>aceEditor).searchBox = new SearchBox(aceEditor);
} else {
(<any>aceEditor).searchBox.show();
}

Harutyun Amirjanyan

unread,
May 23, 2024, 4:11:45 AMMay 23
to ace-d...@googlegroups.com
It is also possible to use editor.execCommand("find")
Reply all
Reply to author
Forward
0 new messages