I've got a design that has a < span > wrapped in a < span > for a font feature to display an icon similar to how the Bootstrap uses <i class="icon-phone"></i> . The CKEditor strips the empty < span > out.
<i class="icon-phone"></i>
Isn't there a setting to correct this without having to use or some other hack?
<span><span class="fa fa-phone"></span>555-555-5555</span>
Hi, you could insert into CKEditor config.js file following line:
CKEDITOR.dtd.$removeEmpty['span'] = false;
It works for me.
Regard to documentation for creditor in config you can also enter that fro applying it for all tags: config.fillEmptyBlocks = false; // Prevent filler nodes in all empty blocks.
config.fillEmptyBlocks = false; // Prevent filler nodes in all empty blocks.
fillEmptyBlocks CKEditor
Please, sign in to be able to submit a new answer.