Skip to content

"valid_elements" syntax for element removal when empty attributes needs example #3588

Description

@blindspeed90

Documentation/Product Version
6.8.5

Links to Page(s) affected
https://www.tiny.cloud/docs/tinymce/latest/content-filtering/#valid_elements

Description of Issue

This entry:

"! - Enables removal of elements with no attributes such as . They can still have content though."

needs example, as I had to look into the code to find the "elementRuleRegExp" in tinymce.js and break it apart to figure out its' usage. Here, it needs to be something like "-span![!style]", the "!" in front of "[", whereas "!style" means a required attribute.

Suggested Fix
Adding the example with that comment would help.

Also, breaking this table up or adding a column to show what control characters can go where. Better than that, from that RegExp, having a template documented like BNF is far clearer (brief and incomplete, but you get the point):

=[","]
=["/"][]["[""]"]
= "+" | "-" | "#"
= "@" | "*" |
=
=
="" | "!"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions