terrylinooo / githuber-md

Markdown editor plugin for WordPress.
GNU General Public License v3.0
616 stars 89 forks source link

Please provide an option to disable shortcuts (fixed) #277

Closed xiaoouwang closed 1 year ago

xiaoouwang commented 2 years ago

Hello dear author,

Tks for the plugin, it's fantastic :)

It has been mentioned some times but I'd like to emphasize how inconvenient it is for some people to not be able to turn off shortcuts.

In my case, ctrl+E is overridden by the emoji controller, which is kind of useless imo.

Keep up the good work!

Best,

xiaoouwang commented 2 years ago

For those struggling with shortcuts, here is a quick fix (I tweaked some parameters, use it at ur own risk):

Use the plugin source file editor, go to wp-githuber-md/assets/vendor/editor.md/editormd.min.js, search the file using ctrl- and you will see all the shortcuts. Delete those that you don't want.

Then, go to wp-githuber-md/src/Controllers/Markdown.php, in the function admin_enqueue_scripts, change wp_enqueue_script( 'editormd', $this->githuber_plugin_url . 'assets/vendor/editor.md/editormd.min.js', array( 'jquery' ), $this->editormd_varsion, true ); to wp_enqueue_script( 'editormd', $this->githuber_plugin_url . 'assets/vendor/editor.md/editormd.min.js');

Voila, hope it helps :)

In short, the change doesn't pertain to this plugin per se so it's a little tricky for the author to provide some config options I guess.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.