문제

I'm trying to integrate Ace editor to my site. I know that it has keyboard shortcuts for opening the search and replace popups. Is there a way to open them programatically?

I noticed that editor.searchBox is undefined from the start but it is set when I hit cmd+F. I tried to look at ace/ext-searchbox.js but I can't find any method calls to try.

도움이 되었습니까?

해결책

See implementation of find command in default_commands.js.

config.loadModule("ace/ext/searchbox", function(m) {m.Search(editor)});

or you can use editor.execCommand("find")

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top