Search codemirror mimics CTRL + F keys with javascript

I try to open the codemirror search dialog (usually activated by pressing CTRL+ F)
by clicking the button:

I tried to use

window.find()

but it does not open a dialog box, it only selects text in the editor ...

Demo

+4
source share
1 answer

You do not want to simulate the actual keystroke. Rather, just run the CodeMirror find command, using execCommandas in http://jsfiddle.net/cb1fd72k/1/

+4
source

Source: https://habr.com/ru/post/1569647/


All Articles