简体   繁体   中英

Show replace panel on click monaco editor

I'm creating an app using monaco-editor. I wanna show the replace panel when I click on a button. I searched a lot but I didn't find what I wanted. I tried that:

  window.editor.focus();
  window.editor.getAction('actions.replace').run()

but it didn't work.

To get the replace panel use the action editor.action.startFindReplaceAction .

editor.getAction('editor.action.startFindReplaceAction').run()

If you want list of all the actions available then use the method editor.getActions() which will give the list of all available actions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM