Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
blindspeed90 opened this issue Jan 23, 2025 · 1 comment
Labels

Comments

@blindspeed90
Copy link

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):

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

@blindspeed90
Copy link
Author

The editor removed all my BNF tags I had as an example above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant