Drupal - Ckeditor strips <i> tags

Add an empty space -  

<i class="fa fa-drupal">&nbsp;</i>

I suggest the following:

<i class="icon icon-classname">&zwnj;</i>

$zwnj is a "zero-width non-joiner" which avoids playing with left-padding/left-margin.


I am on Drupal 8.6.1, Fontawesome module 8.x-2.6 and had a similar problem with CKEditor stripping module inserted icons. I also tried manually typing in “i“ icons in “Source” editing mode. It failed even after I added &nsp at the end and inserted “i” in Filter tags for CKEditor.

For some reason, it all worked when I changed the Fontawesome Admin>Configuration>Font Awesome settings>Font Awesome Tag from “i” to “span” and added “span” tags to CKEditor Filter.

Tags:

Wysiwyg

8