editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

💡 Add shortcodes for invoking different block types

Open stephtr opened this issue 5 years ago • 2 comments

  1. Describe a problem. When mixing different blocks, currently interaction with the toolbar is necessary. It would be nice if every block type could have a specific shortcode, with which one can invoke it.

  2. Describe the solution you'd like. Mockups are welcome. When an empty, new line is focused, entering "* " or "- " will convert it to a list, "# " to a heading. With that one can achieve a Markdown-like typing experience. Since it can be extended to custom blocks, it would also solve #1163, since one could map "\t" to a custom intended block or "$ " to a math equation block.

  3. Are there any alternatives? Since this idea is focused on the "solution", I haven't thought much about the problem it tries to solve or other approaches.

stephtr avatar Jun 08 '20 13:06 stephtr

Maybe related to #709

neSpecc avatar Jun 08 '20 13:06 neSpecc

It'd also be nice to include support for pasted content. So a pasted snippet containing a line beginning # would automatically become a heading, for example.

ollietreend avatar Apr 25 '22 12:04 ollietreend