mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add Preview shortcut for browser
This commit is contained in:
parent
58a85d8386
commit
53ae03becc
1 changed files with 6 additions and 0 deletions
|
@ -396,8 +396,14 @@ $editorToolbar.addButton({{
|
|||
"""
|
||||
)
|
||||
|
||||
def add_preview_shortcut(cuts, editor: Editor) -> None:
|
||||
cuts.append(("Ctrl+Shift+P", self.onTogglePreview, True))
|
||||
|
||||
|
||||
gui_hooks.editor_did_init.append(add_preview_button)
|
||||
gui_hooks.editor_did_init_shortcuts.append(add_preview_shortcut)
|
||||
self.editor = aqt.editor.Editor(self.mw, self.form.fieldsArea, self)
|
||||
gui_hooks.editor_did_init_shortcuts.remove(add_preview_shortcut)
|
||||
gui_hooks.editor_did_init.remove(add_preview_button)
|
||||
|
||||
@ensure_editor_saved
|
||||
|
|
Loading…
Reference in a new issue