Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED Font Awesome tags disappear after saving change in source html
#1
Bug 
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.
Reply
#2
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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Thank you very much. The above solution worked. It will be nice to document the suggestion on the main page.
Regards,

Luya
Reply
#4
I think it would be good to include it in the core.
Reply
#5
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.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
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 .
Reply
#7
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">&#xf083;</i>
Seems to work. No empty tags.
Reply
#8
No your supposed to use your own config.js
Nice workaround.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
I'm using &nbsp; to prevent editor to remove the empty tag,


<i class="*** ***">&nbsp;</i>

Alex
Reply
#10
(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
Reply
#11
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?
Reply
#12
Those 2 specific fixes are already present in stable
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 5 Guest(s)