[Library] Silverware-toolbar

A toolbar for formatting text, on desktop and on a phone, inspired by the one in Notion.

Select some text and a small toolbar shows next to it. You can make the text bold, italic, code or a link, or turn the selected lines into a list, a heading, a quote or a code block, and back. Every change is an ordinary edit of the markdown, so undo works and the page doesn't depend on the library.

What it does so far:

  • bold, italic, underline, strikethrough, highlight, code, links, wiki links and tags, all as toggles (Bold on bold text takes it off)
  • Turn into: paragraph, headings, bullet, numbered and task lists, quote, code block
  • a searchable list of every action, including all SilverBullet commands (Ctrl-Shift-q, also without a selection)
  • with nothing selected, the word at the cursor counts as selected (Bold makes that word bold)
  • :star: a fully customizable toolbar: you choose which actions it shows, in what order and in how many rows, each as an icon or with a label, with your own icon and label if you like, buttons pinned to either end, and a separate setup for desktop and for touch, all from the settings dialog
  • :mobile_phone: gesture buttons on touch: tap for one action, swipe up or down for two more (Bold / Italic / Highlight in one button)
  • text snippets: your own button that inserts a text, with placeholders for the selection and the cursor
  • an emoji picker
  • placement: next to the selection, or docked at the top or bottom of the editor, set separately for desktop and touch
  • your own formats and actions, defined from Space Lua

Most of it can be turned off in the settings, module by module.

To install, add the repository with Library: Add Repository:
https://github.com/damesene/silverware-libraries/blob/main/REPO.md
Then install Silverware Toolbar from the list.

Examples:

i was thinking of adding another row on top solely for formatting when cursor is up, since most of the time using mobile is for reference instead of writing and with too many rows scrolling can be a pain so the bottom row can be docked permanently with shortcuts i use all the time like homepage, open tree, open page (the buttons are up there but phones are too large), silversearch, undo redo etc

just a suggestion!

edit: another one i think would be nice is that the docked toolbar stays permanently up. Currently if i clicked something say configuration (the >_Conf button), press cancel then the toolbar will disappear until i click anywhere to edit., which doesn't happen for the native toolbar

Thank you for the suggestion! It's not a priority for me right now, but I'll look into it when I have some spare time. I originally thought the gesture buttons would be enough. Have you tried them?

yea i did try the gesture but mobile screen are too tiny especially swiping down, with android it will just go into one handed mode