Added a command argument selectionOnly
, which allows you to disable the current behavior and force the command core:toggle-inline-code
to toggle inline code block.
Built a patch:
How to use:
- Create a custom command
inkdrop.commands.add(document.body, "custom:toggle-inline-code", async () => {
const el = document.querySelector('.CodeMirror textarea')
inkdrop.commands.dispatch(el, 'core:toggle-inline-code', { selectionOnly: false })
});
- Add a custom keymap
{
".CodeMirror textarea": {
"cmd-`": "custom:toggle-inline-code"
}
}
Note 1: You may have to disable the default system shortcut key for “Move focus to next window” to use the key combination Cmd-`.
Note 2: This is experimental and it may be changed in the future.