Display table of contents in content editor
What does this MR do and why?
Allow inserting and displaying table of contents in the content editor, that live update each time you update a heading inside the document.
Screenshots or screen recordings
Screen_Recording_2022-07-13_at_11.09.28_AM
How to set up and validate locally
- Edit a wiki page
- Enter content with lots of headings, either in raw markdown view or in rich text view. Example below:
# heading 1
## heading 1.1
### heading 1.1.1
## heading 1.2
### heading 1.2.1
# heading 2
## heading 2.1
### heading 2.1.1
## heading 2.2
### heading 2.2.1
#### heading 5
## heading 2.3
### heading 2.3.1
##### heading 2.3.1.0.1
- In rich text view, click the
+
dropdown and selectTable of contents
- A table of contents list should appear in the content editor
- Try updating any of the headings. The table of contents should live update automatically.
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 #366525 (closed)
Edited by Himanshu Kapoor