Fix toggle code block button in the Content Editor
What does this MR do and why?
This MR fixes a bug in the Content Editor where the code block toolbar button inserts a frontmatter block instead. See the screenshots for a demonstration.
Why is this happening?
The frontmatter extension inherits from the code block extension. It is inheriting the setCodeBlock
and toggleCodeBlock
commands. This creates a conflict where the Frontmatter extension overwrite the original purpose of those commands and insert frontmatter nodes instead.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Edit or create a new Wiki page
- Choose to edit the page using the Content Editor
- Insert a code block as demonstrated in the screenshots above.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #349530 (closed)
Edited by Enrique Alcántara