This adds typing shortcuts that are similar to quill-js and apple's notes application.
Start lists with "1." or "-". When you press space after either of these strings, it will automatically format them as actual lists.
Indent / Dedent lists with and <Shift+Tab>.
Demo page, testing, docs
Upgrade device info plus to ^7.0.0 (#978)
VE Inputs - Keyboard shortcuts #171
This adds a bunch of keyboard shortcuts to the editor. I duplicated a lot of code from the toolbar buttons and I think it would be a good idea to figure out how to get that in one place. Perhaps the toolbar buttons can invoke the Intents/Actions?
VE Inputs - Typing Shortcuts, Add inline code when using back-tick notation
VE Inputs - Support for hashtags, mentions, slash commands #49
We can develop a solution that provides the basic framework for client devs to define their own search methods and embeds or links when adding autocomplete content
Recently a new commit was added in quill 994 indicating how to add typing shortcuts (check 172). We will want to use a similar approach to detect that the authors is about to add a user handle, hashtag or slash command.
@ # and / are the common symbols for such tasks
For user handles and hashtags we can use either links or embeds. This choice is up to the client dev to decide. Links are fully selectable. However it makes no sense to break apart a hashtag or user handle link in two parts. Therefore we might want to do the same as most apps do when editing text that contains hashtags, we disable it. Then again this is the client devs choice. All we can do is to showcase the demos. One thing to remember about embeds is that you can't select their text as inline regular inline text. You can select all or nothing (think of images).
At the moment I believe slash commands are best suited to insert embeds. For ex: adding an image from the VS docs apps, or adding a diagram, or a code snippet. There are many potential commands. All these commands will be provided by the client dev. We can demonstrate a few examples but the client dev is the final designer of what happens after a slash command was confirmed. The client dev can choose to execut any command he desires. We can only hep by providing the callback and params (+ demo pages). The goal is to maintain the core lib as lightweight and simple as possible.
Once detected we invoke a callback which will trigger the rendering of the autocomplete options menu. We will provide as params: the markers, the text position, the text after the magic token.
Once the user taps one of the options provided by the client dev, the client dev will invoke a custom made method
Provide demo page, documentation, tests.
The interaction can be cancelled by tapping outside or by pressing Escape.
In the future we can share plugins with of our own implementations of hashtags, user handles and slash commands for the less experience users. So far this is not an urgent goal. Not until we have financial stability in VS.
We will write most of the new code in a new module called /handles
We could have some built in slash commands:
/ image
/ emoji
/ table
/ extra info (expand)
/ code snippet
/ link
/ numbered list
/ bullet list
/ topic
/ formula
Hashtags - User @kairan77 has provided a nice demo on how to create a button to add hashtags. He relies on links to add the hashtags. It's a nice setup working within the existing Quill API. He is a strong believer in lightweight libs, and we endorse the same view. However our goal is to go one step further and instead of working with the custom toolbar buttons and controller methods we plan to trigger the interaction from typing shortcuts. We can expose a callback that provides the necessary data for the client dev to position the autocomplete options. This means we keep our implementation as lightweight as possible. Similar to how we did it for the quick menu and markers attachments.
VE Inputs - Rules, Inline code, exit styling by pressing right key #47
After inserting inline code it would be nice to have hotkey to exit the inline style and continue with regular styles.
It would also be AMAZING if when the curser is at the end of the inline code style, the right keyboard button concludes the inline code and creates a space ready for the normal styling to work again. Slack does it like that and I LOVE the function as I use it a lot
VE Inputs - Typing shortcuts #172
VE Inputs - Keyboard shortcuts #171
VE Inputs - Typing Shortcuts, Add inline code when using back-tick notation
VE Inputs - Support for hashtags, mentions, slash commands #49
We could have some built in slash commands:
Hashtags - User @kairan77 has provided a nice demo on how to create a button to add hashtags. He relies on links to add the hashtags. It's a nice setup working within the existing Quill API. He is a strong believer in lightweight libs, and we endorse the same view. However our goal is to go one step further and instead of working with the custom toolbar buttons and controller methods we plan to trigger the interaction from typing shortcuts. We can expose a callback that provides the necessary data for the client dev to position the autocomplete options. This means we keep our implementation as lightweight as possible. Similar to how we did it for the quick menu and markers attachments.
Mentions - A code sample can be found here.
VE Inputs - Rules, Inline code, exit styling by pressing right key #47
The original Quill issue: https://github.com/singerdmx/flutter-quill/discussions/848