Content editor: Deserialize table of contents using the client-side parser
What does this MR do and why?
CONTEXT These changes are behind the preserve_unchanged_markdown
feature flag.
This MR implements support for client-side deserialization of table of contents in the Content Editor. This means that table of contents elements are parsed/rendered in the web browser instead of using the
This MR also creates specs for tables of contents in the GitLab Flavored Markdown specs: !96701 (cea1867f)
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable the
preserve_unchanged_markdown
feature flag. - Create or edit a Wiki page.
- Paste the following Markdown snippet in the classic markdown editor:
[[_TOC_]] # Heading 1 Heading 1 ## Heading 2 Heading 2
- Switch to "Rich Text" mode.
- You should see a table of contents element.
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 #359025 (closed)
Edited by Enrique Alcántara