Reputation: 5934
I've been trying to get TinyMCE to allow a template tag for use in my angular app.
ie. <aside #tagname></aside>
Adding this to the config still strips out any #...
.
extended_valid_elements : 'aside[#]'
Adding all reformats it to an attribute with =""
.
extended_valid_elements : 'aside[*]'
Is there a way to do this?
UPDATE:
github.com/tinymce/tinymce-angular/issues/220
Upvotes: 0
Views: 207
Reputation: 356
It looks like the parser is removing attributes that start with '#' even if they're in the extended_valid_elements
.
For example if you set extended_valid_elements : 'aside[#test]'
you can confirm that it did add that attribute by running tinymce.activeEditor.schema.elements.aside
and confirming that the attribute is there.
However it looks like the SAXParser does not support characters other than the ones that match the regex pattern \w - the code is hard to follow though so I wouldn't be surprised if I was wrong.
Upvotes: 1