Editor Toolbar buttons and their shortcuts

Folks,

Many of the editor toolbar buttons effectively wrap the text selection with wiki markup such as ''for bold'' etc… most have easy and memorable shortcuts like ctrl-b for bold, ctrl-i for italics.

  • With such shortcuts available I thought I would hide them behind the more “editor toolbar drop down” by unchecking them in the editor toolbar settings.
  • This gives me more room for things I do not remember the shortcut for.
  • Unfortunately when I do hide the buttons behind more, the shortcuts no longer work. Browser shortcuts take over.

Seeking a solution

  • I would like away to reactivate these shortcuts in the editor whilst keeping them behind more.

Later I would like to have multiple groups like the more button behind which I could place Editor toolbar buttons while the shortcuts remain working.

I dont have the time to create a solution right now but here’s something that might help:
You can use CSS and / or the <template> html element to hide the buttons and keep the shortcuts active, this is what I use in my editor macro:

https://demos.tiddlyhost.com/#%24%3A%2FEditor%2FMacro

\define editor(field , placeholder, type)
<span class="libro-editor">
<$let targetTiddler="$(currentTiddler)$" type=<<__type__>>>
<$edit-text
class="tc-edit-texteditor tc-edit-texteditor-body"
placeholder="$placeholder$"
tabindex={{$:/config/EditTabIndex}}
focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}}
cancelPopups="yes"
field="$field$"
tag="textarea"
>
<template>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]">
<$reveal type="nomatch" state=<<config-visibility-title>> text="hide">
{{||$:/core/ui/EditTemplate/body/toolbar/button}}
</$reveal>
</$list>
</template>
</$edit-text>
</$let>
</span>
\end
2 Likes