Posts: 2
Threads: 1
Joined: Jun 2014
2014-06-17, 07:51:30
(This post was last modified: 2014-06-17, 08:13:32 by luya.)
Hello,
The text editor in source format from Get Simple 3.3.2 is unable to preserve the class attribute code from
Font Awesome. For example,
Code:
<ul class="fa-ul">
<li><span class="fa-li fa fa-check"></i> We stand by our work with a 100% guarantee of excellent service</li>
</ul>
Where
fa are the classt attribute provided by Font Awesome. Use the example from the url to reproduce the issue.
Posts: 6,266
Threads: 181
Joined: Sep 2011
ckeditor deletes empty tags
add to config.js
// prevent removal of empty tags
CKEDITOR.dtd.$removeEmpty['i'] = false;
there is more details in forums somewhere
Posts: 2
Threads: 1
Joined: Jun 2014
Thank you very much. The above solution worked. It will be nice to document the suggestion on the main page.
Regards,
Luya
Posts: 1,127
Threads: 136
Joined: Feb 2012
I think it would be good to include it in the core.
Posts: 6,266
Threads: 181
Joined: Sep 2011
It has been for <i> and <span> , but they are commented out, we cannot decide how to handle this and which elements to remove for the user.
// prevent removal of empty inline tags
// CKEDITOR.dtd.$removeEmpty['i'] = false;
// CKEDITOR.dtd.$removeEmpty['span'] = false;
If you guys can vote on what elements should be included and if this is a innocuous change, I will consider it.
Posts: 1,127
Threads: 136
Joined: Feb 2012
Font awesome goes with bootstrap - it's pretty popular. atm every upgrade of GS is going to require digging into the admin folder and editing config.js .
Posts: 1,127
Threads: 136
Joined: Feb 2012
There is an alternative work-around:
The recommended font awesome syntax is [example]
Code:
<i class="fa fa-camera-retro"></i>
If you take the unicode from the
cheat sheet you can use that instead, ie
Code:
<i class="fa"></i>
Seems to work. No empty tags.
Posts: 6,266
Threads: 181
Joined: Sep 2011
No your supposed to use your own config.js
Nice workaround.
Posts: 89
Threads: 12
Joined: Sep 2010
I'm using to prevent editor to remove the empty tag,
<i class="*** ***"> </i>
Alex
Posts: 1
Threads: 0
Joined: Jun 2015
(2014-11-21, 04:06:18)shawn_a Wrote: It has been for <i> and <span> , but they are commented out, we cannot decide how to handle this and which elements to remove for the user.
// prevent removal of empty inline tags
// CKEDITOR.dtd.$removeEmpty['i'] = false;
// CKEDITOR.dtd.$removeEmpty['span'] = false;
If you guys can vote on what elements should be included and if this is a innocuous change, I will consider it.
Thanks for this solution! That was driving me nuts
Posts: 1
Threads: 0
Joined: Mar 2016
2016-03-12, 18:57:37
(This post was last modified: 2016-05-22, 07:43:24 by Umbrella.)
shfn_a
It has been for <i> and <span> , but they are commented out, we cannot decide how to handle this and which elements to remove for the user.
// prevent removal of empty inline tags
// CKEDITOR.dtd.$removeEmpty['i'] = false;
// CKEDITOR.dtd.$removeEmpty['span'] = false;
If you guys can vote on what [**SPAM LINK REMOVED**] elements should be included and if this is a innocuous change, I will consider it.
Does Get Simple support Font Awesome these days or do we still need to configure the config.js every time?
Posts: 6,266
Threads: 181
Joined: Sep 2011
Those 2 specific fixes are already present in stable