bocan
bocan

Reputation: 77

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.

Upvotes: 1

Views: 520

Answers (1)

wahab memon
wahab memon

Reputation: 2416

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.

Upvotes: 3

Related Questions