Archived

This topic is now archived and is closed to further replies.

  • 0

FontAwesome Code Disappears When changing in "Visual" view in editor


Question

Posted · Report post

In the text view Im creating the following code

 

<ul class="icons">

<li><i class="icon-ok"></i> Lists</li>

<li><i class="icon-ok"></i> Buttons</li>

<li><i class="icon-ok"></i> Button groups</li>

<li><i class="icon-ok"></i> Navigation</li>

<li><i class="icon-ok"></i> Prepended form inputs</li>

</ul>

 

As per the FontAwesome code.

 

But when I click on Visual view and the back to Text View in the content editor, the the code for the ticks disappears. 

 

That is  this part:    <i class="icon-ok"></i>   disappears.

 

Is this a bug?   Is there a way to fix this ?

 

THanks

Share this post


Link to post
Share on other sites

10 answers to this question

Posted · Report post

The visual editor does not recognise <I> as valid code and strips it.

Also there is no need to escape your quotes like that

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, Bought this plugin yesterday, just what i was looking for by the way! 

 

I was wondering where I can find the list of possible css? I don't wan't to create any new if something good already exists

 

I have by the way just tested using these short codes in the header of the pagelines boxes and it works!!! Will make my life easier!

Thanks to the creator

D

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Dalia,

 

I don't think there is a list of the css used in the plugin. But you can check with the author on their product support forum, they might be able to advise further. http://www.pagelines.com/forum/forum/68-store-products/ just select the plugin/section from the drop down and that will assign it to the relevant developer :-)

Share this post


Link to post
Share on other sites

Posted · Report post

what do you mean "escape your quotes".

 

I pretty much have to add that code in throughout my entire page (I have a lot of ticks), every time I use the visual editor.  So is there a solution to this problem?  

Share this post


Link to post
Share on other sites

Posted · Report post

To put it very simple, the Visual editor for Wordpress is rubbish and the first thing I do after I have finished the installation of Wordpress, is to disable the visual editor.

 

So don't use the visual editor, it causes of kinds of issue with HTML, especially switching from one to the other. If you disable the visual editor, this should resolve your issue.

Share this post


Link to post
Share on other sites

Posted · Report post

The element <I> is not supported by the wp visual editor.

There is no fix or workaround other than do not use the visual editor with HTML

Share this post


Link to post
Share on other sites

Posted · Report post

I have the same problem. Even installing plugins that promise to "keep your HTML untouched" didn't prevent WP from deleting an empty <i> tag. I found that if the <i> tags enclosed some content (whitespace is not working) the visual editor mode won't delete it (WP 3.5.1). At least for me :)

So now I use <i class="icon-book"><span style="color: #fff;">.</span></i> - pretty crappy workaround. Authors in Visual mode still delete this "invisible" content by accident.
I would love to see someone write a shortcode for this: [i class="icon-book"] so far nothing like this seems to be available or I didn't get it running.

I wonder if this would collide with the pagelines css class already in use though.

 

Share this post


Link to post
Share on other sites

Posted · Report post

perfect, thank you Danny. just bought the Plugin and going to install.

Share this post


Link to post
Share on other sites

Posted · Report post

No problem, happy to help!

Share this post


Link to post
Share on other sites