-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] shortcut for ckeditor's edit block menu #1141
Comments
would indeed be great to have shortcuts/hotkeys for some formatting like "inline code", "block code" and so on. I think it is dependent of Ckeditor, and maybe there is a plugin for that |
Checkout https://ckeditor.com/docs/ckeditor5/latest/features/autoformat.html Things like inline/block code can be triggered in markdown fashion via typing `something` and ``` |
It's not complete though. The checkbox (to-do list) does not work when doing [ ] or [x]. |
@psybustermk2 these will work in (not yet released) 0.47 |
There is already 0.47.5 available. How can we trigger "edit block" menu from keyboard? |
@zadam was referring to the check box list, not the keyboard shortcuts |
I have been searching through the issues here asking about the keyboard shortcut (earliest I found was #764) and didn't find any solution. I needed this functionality badly so I came up with this JS backend code to trigger the ckeditor toolbar. api.bindGlobalShortcut("ctrl+shift+p", function(){
let button_off = document.querySelector('.ck.ck-button.ck-off.ck-block-toolbar-button');
if (button_off)
button_off.click();
else
document.querySelector('.ck.ck-button.ck-on.ck-block-toolbar-button').click();
}); I added a shortcut too for blockQuote which I use a lot. I don't know if this is the right way of doing it but it works for me. I love Trilium for being this customizable. Thanks @zadam ! api.bindGlobalShortcut("ctrl+shift+q", function(){
api.getActiveTabTextEditor(function(editor){
editor.execute('blockQuote');
});
}); |
@code-ink-space This is a good idea! However, in version 0.59.1, the multi-tag function will cause the shortcut key to not work. I made some changes:
|
Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: TriliumNext/Notes#100 |
can you add the shortcut to popup the ckeditor's edit block menu?
because some funcitons in block menu have the shortcut , but I want to quick access others(inline note , etc).
The text was updated successfully, but these errors were encountered: