I want to use a data-attribute in a span-Tag. The CKEditor removes this attribute.
If I add it in a p-Tag it will not removed and this is OK.
processing:
allowAttributes: [data-count]
is added in the YAML-file.
I've tried this and other combinations, nothing works.
config
extraAllowedContent: '*(*)[data-*]'
What do I have to do, to keep the data-attribute in a span-Tag?
I have done this for iframe tag with attribbuts, no allowAttributes used for this:
processing:
allowTags:
- iframe
editor:
config:
extraAllowedContent:
- iframe[*]
for you this should do the trick:
editor:
config:
extraAllowedContent:
- span[*]
来源:https://stackoverflow.com/questions/55041254/typo3-ckeditor-strips-data-attributes-in-span-tags