Editable HTML is:
<p>
Lorem ipsum dolor sit amet, consectetur
<span
data-id="show-modal"
data-action="open"
class="sectionref text"
contenteditable="true"
>adipiscing</span
>
elit. In sed ornare lectus, a rutrum lacus.
</p>
Non-editable looks like this:
<p>
Lorem ipsum dolor sit amet, consectetur
<span
data-id="show-modal"
data-action="open"
class="sectionref title"
contenteditable="false"
>Tempor deserunt</span
>
elit. In sed ornare lectus, a rutrum lacus.
</p>
When I take editable
representation in plain HTML, and edit the span - nothing is split.
Doing the same in the PM editor results in something like:
<p>
Lorem ipsum dolor sit amet, consectetur
<span
data-id="show-modal"
data-action="open"
class="sectionref text"
contenteditable="true"
>adipi</span>
bca
<span
data-id="show-modal"
data-action="open"
class="sectionref text"
contenteditable="true"
>scing</span>
elit. In sed ornare lectus, a rutrum lacus.
</p>
This is the serialized schema:
{
"topNode": "doc",
"nodes": {
"content": [
"paragraph",
{ "content": "inline*", "group": "block", "parseDOM": [{ "tag": "p" }] },
"doc",
{ "content": "block+" },
"text",
{ "group": "inline" },
"sectionref",
{
"content": "inline",
"group": "inline",
"inline": true,
"attrs": {
"refid": { "default": null },
"show": { "default": "text" },
"text": { "default": "" }
},
"parseDOM": [{ "tag": "sectionref" }]
}
]
},
"marks": {
"content": [
"link",
{
"inclusive": false,
"attrs": {
"href": { "default": null },
"target": { "default": "_blank" }
},
"parseDOM": [{ "tag": "a[href]" }]
},
"bold",
{
"parseDOM": [
{ "tag": "strong" },
{ "tag": "b" },
{ "style": "font-weight" }
]
},
"italic",
{
"parseDOM": [
{ "tag": "em" },
{ "tag": "i" },
{ "style": "font-style=italic" }
]
},
"underline",
{
"parseDOM": [
{ "tag": "u" },
{ "style": "text-decoration", "consuming": false }
]
},
"highlight",
{
"attrs": { "color": { "default": null } },
"parseDOM": [{ "tag": "mark" }]
}
]
}
}