TINYDOC-3494 - Add guidance for disabling or stripping HTML formatting - #4286
Merged
Conversation
kemister85
marked this pull request as ready for review
July 22, 2026 00:11
kemister85
requested review from
a team,
MitchC1999,
ShiridiGandham,
shanmen-tiny and
tiny-ben-tran
and removed request for
a team
July 22, 2026 00:11
tiny-ben-tran
approved these changes
Jul 26, 2026
…lock rewrapping
ShiridiGandham
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: TINYDOC-3494
Site: Staging
Changes
Closes a documentation gap where users searching for how to disable or strip HTML formatting could not find direct guidance. The relevant configuration options (
valid_elements,invalid_elements,extended_valid_elements,paste_as_text) already exist on the Content filtering page, but there was no worked guidance for restricting or stripping formatting, and no path to it from the Content formats page where these users typically land.modules/ROOT/pages/content-filtering.adoc— Added a new "Disabling or stripping HTML formatting" section that:valid_elementsreplaces the allowed set,extended_valid_elementsadds to it,invalid_elementsremoves named elements) and links each option mention to its section anchor on the page.valid_elementsandinvalid_elementsrestrict content, whileextended_valid_elementswidens the default schema and is therefore not a stripping mechanism, with a pointer to its option description lower on the page.forced_root_block(pby default), so a removed<h1>is returned as a<p>.valid_elements, removing specific formatting withinvalid_elements, and stripping all formatting from pasted content withpaste_as_text.SchemaandDomParserAPI reference pages and the Content formats page.modules/ROOT/pages/content-formatting.adoc— Added a pointer from the Content formats page to the new guidance so users looking to restrict or strip formatting are directed to the correct page.Validation
tinymcesource (core/main/ts/api/html/Schema.ts,DomParser.ts).DomParser.ts(addRootBlocks, called for root content after filtering) and theforced_root_blockdefault ofpincore/main/ts/api/Options.ts.forced_root_block,apis/tinymce.html.schema,apis/tinymce.html.domparser,copy-and-paste#paste_as_text,content-filtering#disabling-or-stripping-html-formatting).Prepared for documentation team review.