- Issue created by @mrzoom
- πΈπͺSweden mrzoom
After some more digging, I think this is related to this issue:
https://github.com/ckeditor/ckeditor5/issues/1068Where a "soft-break" (
<br>
) is handled the same way.I don't know how to create a path... But by adding:
allowAttributesOf: '$text'
To your schema like this:
_defineSchema() { this.editor.model.schema.register("shy", { allowWhere: "$text", isInline: !0, allowAttributesOf: '$text' }) }
And change your execute() method to this:
class t extends e.Command { execute() { this.editor.model.change((e => { const r = e.createElement('shy', this.editor.model.document.selection.getAttributes()); this.editor.model.insertContent(r) })) } }
Then the
<shy>
element is inserted inside for example<strong>
, instead of breaking the text in to two separate<strong>
element. - Status changed to Needs review
11 months ago 10:22am 15 December 2023 - π©πͺGermany stefan.korn Jossgrund
Here is a patch based on #2.
It would be better if the source that leads to shy.js would be provided, but until then one can just patch the shy.js directly I suppose.