When you do cmd+f in the Monaco Editor, you get the find/search box appear.
Is there a way to have this open when the editor loads, with pre-populated text?
monaco-editor version: 0.9.0
Browser: chrome
OS: macOS
Steps or JS usage snippet reproducing the issue:
You can run editor.getAction('actions.find').run().
Is it at all possible to prepopulate the search box with arbitrary strings, like @owennicol asks? The only thing I've managed to do so far with the function you mentioned, @rebornix, is to search for the text that is currently selected.
@owennicol I already added an answer to your question on SO:
https://stackoverflow.com/a/51291297/596082
how to close the search panel programmatically?
@ijse I found the close event ID is closeFindWidget in this useful snippets. https://github.com/Microsoft/monaco-editor/issues/823#issuecomment-470754000
Most helpful comment
You can run
editor.getAction('actions.find').run().