Ckeditor 5 codeblock syntax highlight

Install Drupal 10
  • Enable ckeditor5 core module
  • Add text format with ckeditor5 and enable codeblock/codesnippet
  • Add content with Rick text editor field and use ckeditor5 text format
  • Add codeblock/codesnippet by selecting any code language
  • syntax highlight should work which is not working
  • Syntax highlight is working on content view page

Comments

deepaverma created an issue. See original summary.

deepaverma’s picture

Title: ckeditor 5 codeblock syntax highlight while adding/editingcontent » ckeditor 5 codeblock syntax highlight while adding/editing content
wim leers’s picture

Title: ckeditor 5 codeblock syntax highlight while adding/editing content » CKEditor 5 codeblock syntax highlight while adding/editing content
Related issues: +#3263384: Add ckeditor5-code-block package and CodeBlock plugin

There is no syntax highlighting on the front end either unless you installed a filter for your text format such as https://www.drupal.org/project/highlight_php.

There are reasons why the CKEditor 5 functionality does not support this — see #3263384: Add ckeditor5-code-block package and CodeBlock plugin. That won't change.

wim leers’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.