Open sergiocerrutti opened 8 years ago
I see the preview is also still working with Ctrl+p
even if preview is disabled. You can test it in the Twitter footer editor you have in you demo page. Once you trigger the hotkey, you cannot even go back to the editor.
Since I cannot rewrite default buttons without editing the core, I've disabled default link button and created a new one, but the problem is the hotkey is still triggering the disabled link button (and the new one too of course).
Also I cannot unbind any specific hotkey because events are not namespaced (for example: 'keydown.cmdUrl'), so the only way is to unbind all hotkeys and bind them again.
A quick hack is to remove that button from the DOM inside the
onShow
callback:$('[data-handler="bootstrap-markdown-cmdUrl"]', e.$editor).remove();
Thank you @toopay!