How to prevent empty html element e.g. span or i from being deleted automatically in CKEditor5

Viewed 7

I need to insert empty html elements like below in Source Editing in CKeditor5, but CKEditor5 will automatically remove these once back to Editor view.

<span id="message"></span>

<i class="fa fa-user"></i>

I have set htmlSupport.allow to open for all html elements in GeneralHtmlSupport, it's not working, also I have checked Ckeditor5 official forum and can't find an achievable solution.

I appreciate if you have a hint or solution.

0 Answers
Related