Hi All,

Have been using CKEditor module for a LONG time, issue I am about to describe I have had before but can't recal the fix I used.

Anyway, the issue, I create content, in this case a block with social media links:

  <a class="btn btn-social-icon btn-twitter">
    <span class="fa fa-twitter"></span>
  </a>

I then save the block, all is fine. I go back to edit and the code has gone. I have ensured that the tags are all allowed in the input filter, tried filtered and full html, tried turning off the CKEditor advanced filter, nothing seems to work. I have obviously overlooked something, can anyone point out what I have missed?

Nick

Comments

nickbits created an issue. See original summary.

marcoka’s picture

yes you use fontawesome and your styles get removed

use this

on /admin/config/content/ckeditor/edit/Full "Advanced options"

config.allowedContent = true;
config.contentsCss = '//cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css';
config.extraAllowedContent = 'p(*)[*]{*};div(*)[*]{*};li(*)[*]{*};ul(*)[*]{*}';
CKEDITOR.dtd.$removeEmpty.i = 0;

foun it somewhere her in the issue queue. lost where

nickbits’s picture

Thank you @marcoka, much appreciated. Have tried it and it doesn't seem to work. I have only had a quick try, will try again on Tuesday and see how I get on.

nickbits’s picture

Status: Active » Closed (fixed)

Thank you, you are a star.