Rich Text Editor strips font awesome tags

Vardan Hovsepyan asked on August 16, 2017 19:05

Hi,

On our Kentico 10 MVC admin site, when I add font awesome icons in the rich text editor, right after saving the page or switching to design view all the icons are gone.

Any ideas why?

Thank you !

Correct Answer

Brenden Kehren answered on August 16, 2017 19:28

Check out this post about the ckeditor removing div tags. This can also be applied to font awesome icons.

Essentially you need to modify the config.js file for the ckeditor to not remove those. You can find the config.js file in /CMS/CMSAdminControls/CKeditor/config.js

Once you've added the code, make sure to clear your cache in the site and within your browser to see the changes.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Vardan Hovsepyan answered on August 16, 2017 20:39

Thanks Brenden,

To help others with the similar issue with font awesome icons I'll post here the config changes I did.

CKEDITOR.dtd.$removeEmpty['i'] = false;

Basically the editor was thinking the font awesome icon code is an empty <i> tag and was stripping it.

3 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.