How to apply CKEditor 5 Bold Plugin to my own inline elements? #6033
Labels
resolution:duplicate
This issue is a duplicate of another issue and was merged into it.
type:task
This issue reports a chore (non-production change) and other types of "todos".
I followed the Implementing an inline widget tutorial at https://ckeditor.com/docs/ckeditor5/latest/framework/guides/tutorials/implementing-an-inline-widget.html.
I want to extend it to enable bolding of placeholders.
I added
this.editor.model.schema.extend( 'placeholder', { allowAttributes: 'bold' } );
toPlaceholderEditing.init()
, so it now looks like this:Then I wrapped my placeholder in
<strong></strong>
, like so:<strong><span class="placeholder" >{mike}</span></strong>
The inspector shows me the attribute gets added to
placeholder
in the model, like so:https://i.stack.imgur.com/zDVNm.png
But, the rendered html in the editor does not have
<strong></strong>
downcast on ithttps://i.stack.imgur.com/sHsYP.png
How can I make this work?
Thanks.
The text was updated successfully, but these errors were encountered: