1

We have a site built on Bootstrap.

Certain HTML modules are maintained with CkEditor.

We use Bootstrap icons according to standard syntax, e.g.: <i class="icon-envelope"></i>.

Our problem: CkEditor interprets that syntax as an empty tag set (i.e., <i></i>) and deletes it.

As a result, we currently can't use Bootstrap icons in any HTML modules maintained with CkEditor.

Any solutions out there? Thanks!

madth3
  • 7,275
  • 12
  • 50
  • 74
redo1134
  • 161
  • 1
  • 1
  • 3
  • 1
    Identical question was asked few days ago: http://stackoverflow.com/questions/14829961/ckeditor-and-escaping-elements. – Reinmar Feb 14 '13 at 16:14
  • TY Reinmar. That URL didn't mention Bootstrap, thus didn't find it in my searching. I've been searching SO for an answer for a week, so I'm grateful for your help. – redo1134 Feb 14 '13 at 19:40
  • i came across the same problem , read here for a solution http://stackoverflow.com/a/18254082/1316372 – HenryW Aug 15 '13 at 15:13

1 Answers1

1

Paste this in CKEditor config file:

// allow i tags to be empty (for font awesome)
CKEDITOR.dtd.$removeEmpty['i'] = false
ANTARA
  • 810
  • 1
  • 13
  • 20