Ace Editor - Change CTRL+H keybinding

前端 未结 2 1202
星月不相逢
星月不相逢 2021-01-05 07:40

I\'m working on an implementation of Ace Editor and Ctrl+F works great for the built-in \"Find\" dialog, however I\'m trying to find a way to

2条回答
  •  我在风中等你
    2021-01-05 08:32

    This worked for me:

    editor.commands.addCommand({
    name: 'replace',
    bindKey: {win: 'Ctrl-R', mac: 'Command-Option-F'},
    exec: function(editor) {
    ace.config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)});
    },
    readOnly: true
    });
    

提交回复
热议问题