I am trying to inject a span tag into an editor with some data attributes, like contenteditable = false and read only = true. It seems like you guys are stripping those attributes from my span tag when injecting it into an editor. I am wondering if you guys have a toggle or a work around this. tag <span class="data-variable mceTmpl" contenteditable="false" data-variable-key="NAME" data-readonly="true">{$NAME}</span>
.
This is not a generic HTML editor system — it takes a schema, and documents can only take the shape described in that schema. If you don’t have a node or mark to represent your span elements, they won’t be part of the document.
I made a custom schema and used the mark and node to “register” aka retain those attributes but it is still stripping them from the editor.