atomic-data-browser
atomic-data-browser copied to clipboard
Slash commands in document editor
- User presses
/, show the slash followed by a popout with a bunch of searchable commands - These should ideally be pluggable (inspiring video about plugin system for Silverbullet)
- On pressing enter, select the command
Questions:
- Should we allow
/commands only at the start of an element, or do we allow it inside elements? If we allow inside, we could useturn intocommands, like silver bullet. However, it might make things more complex.
Some ideas for commands:
- Header levels. Turns current line into header, or creates new line with header
- Upload file(s). Opens native file picker.
- Link to (new) resource. Searches resources.
- Create table, sese #267
- Create ChatBox / ChatRoom
- Embed youtube / spotify link (or other pluggable embed things)
- Create task
Implementation
- We add a
SlashCommandsStorethat has aregisterfunction. EachSlashCommandhas ashortname,descriptionandFunction. The function should be able to do all sorts of funky things. Maybe it needs to be passed someContextthat includes the current Element of the document
@Polleps do you have some extra ideas on this?