CKEditor 5 - allow specific attribute

Viewed 651

How do I allow a specific attribute on any element? For example, I would like to configure CKEditor 5 to allow/preserve a 'data-lref' attribute as follows:

<p><span data-lref="a">Text is </span><strong data-lref="b">bold</strong><span data-lref="c">.</span></p>

I think this the documentation: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/conversion/conversion-preserving-custom-content.html#loading-content-with-all-attributes

But how can I check/allow for only 'data-lref, instead of allowing every attribute?

0 Answers
Related