ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Code snippet feature

Open jodator opened this issue 6 years ago • 10 comments

📝 Provide a description of the new feature

NOTE: CKEditor 5 already offers code blocks (see https://ckeditor.com/docs/ckeditor5/latest/features/code-blocks.html) which is a simpler version of this feature. Code snippets, on the other hand, are meant to be richer code blocks, a bit like an embedded IDE inside CKEditor 5.

  • The proper code editing experience.
  • Embedded code editor and syntax highlighting.
  • Most likely, will only support comments and track changes on the entire code snippet.
  • Important: it seems totally feasible to integrate it with real-time collaboration editing if we use an code editor like Monaco.

We'll be happy to hear your feedback on this feature to know how to shape it.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

jodator avatar Nov 21 '19 10:11 jodator

It's been a year since this issue was created, is there any current progress on it that I can help contribute to? Syntax highlighting at the very least, with highlight,js or alternatives is amongst my top priorities right now.

lflare avatar Dec 19 '20 09:12 lflare

Monaco integration would be amazing 👍🏻

rhukster avatar Dec 20 '20 19:12 rhukster

Currently, syntax highlighting is a feature that can maximize the user experience

regischen avatar Dec 23 '20 02:12 regischen

What are the downsides to Monaco integration?

good-praxis avatar Apr 08 '21 06:04 good-praxis

Does this feature have any specific schedule?

Joeycz avatar May 12 '21 11:05 Joeycz

Is there any current progress on it ?

shaozj avatar Nov 03 '21 02:11 shaozj

There is strong interest in this from the Drupal side too: https://www.drupal.org/project/codesnippet/issues/3269387#comment-14490254

wimleers avatar Apr 22 '22 11:04 wimleers

FWIW I implemented syntax highlighting for Trilium (which uses CKEditor5) with a simple Trilium widget, see https://github.com/antoniotejada/Trilium-SyntaxHighlightWidget

antoniotejada avatar May 02 '22 14:05 antoniotejada

Is there any current progress on it ?We are looking forward to syntax highlighting.

zgpnuaa avatar Sep 16 '22 07:09 zgpnuaa

I successfully configured this plug-in CKEditor5-CodeBlock-With-Syntax-Highlight in ckeditor5. It is great in edit mode, but it does not display correctly in preview mode. image

zgpnuaa avatar Sep 16 '22 07:09 zgpnuaa

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 05 '23 05:10 CKEditorBot

May I ask what is the current progress of the code highlighting function? Or is there any other plugin solution?

ba1q1 avatar Oct 08 '23 03:10 ba1q1