ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.58k stars 3.7k forks source link

Code block and autoformat with language, e.g: ```js #15860

Open KiddoV opened 9 months ago

KiddoV commented 9 months ago

📝 Ask a question

I want to make some adjustment on the auto format feature, for example I want to trigger the code feature with double backtick instead of single backtick: ``code`` instead of `code` or even with many backticks like Github does.

Also I want to trigger the code block after defined the language when typing like: ```javascript\<Enter> => trigger the code block ui instead of ``` => trigger. How can I config the plugin to achieve this behavior, thanks!

Witoso commented 8 months ago

I want to make some adjustment on the auto format feature, for example I want to trigger the code feature with double backtick instead of single backtick

Take a look on at Autoformat and creating custom autoformatters
 

Also I want to trigger the code block after defined the language when typing like:

There's no API to achieve this., we can change it to the feature request if you want.

KiddoV commented 8 months ago

There's no API to achieve this., we can change it to the feature request if you want.

That would be nice. Thanks!