Don't render TOC in note previews or RTE, and remove option to add from RTE
What does this MR do and why?
Fixes TOC (Table of Contents) tags should not be rend... (#563858) by no longer rendering tables of contents in note contexts when previewing markdown. These aren't actually rendered for notes, so we shouldn't render them when previewing notes either! This also stops them from being shown in the rich text editor (RTE). Now everything appears in preview and RTE the same way it does when you submit the note.
We also hide the option to add a table of contents from the RTE in these contexts, since they won't get rendered anyway.
The email comments concern from that issue is split into TOC (Table of Contents) tags should not be rend... (#581849).
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
|
|
|
|
|
|
How to set up and validate locally
- Check out the branch.
- Try previewing a note with headings and
[[_TOC_]]in the source.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.







