Jump to content

Archived

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

Objectif-Mariage

How to desactivate the WP re-writing code ?

Recommended Posts

Objectif-Mariage

Hello , 

I use the wp editor to write my page in html  (going from the code html to the visual editor , and to the visual editor to the hmtl code ) .
 

But, some times, i absolutly don't understand why, it automatically modiffy my code !! .... 

 

for exemple , today i have put a lot of image using the the "i" balise( 

  1. <p><i class="icon-camera-retro icon-large"></i> icon-camera-retro</p>)

 . And i just come back to change something, and ALL of them had despaired ! What a lost of time !

 

So do you know how to desactivate this rewriting system ? with a plugin or other ???

 

 

Alexandre

 

Share this post


Link to post
Share on other sites
Simon

Hello , 

I use the wp editor to write my page in html  (going from the code html to the visual editor , and to the visual editor to the hmtl code ) .
 

But, some times, i absolutly don't understand why, it automatically modiffy my code !! .... 

 

for exemple , today i have put a lot of image using the the "i" balise( 

  1. <p><i class="icon-camera-retro icon-large"></i> icon-camera-retro</p>)

 . And i just come back to change something, and ALL of them had despaired ! What a lost of time !

 

So do you know how to desactivate this rewriting system ? with a plugin or other ???

 

 

Alexandre

Never ever switch back and forth between visual and text editor, you are guaranteed to lose formatting.

 

If you are going to add raw HTML then you must only use the text editor

Share this post


Link to post
Share on other sites
Objectif-Mariage

LOL , thank you Simon_P for your answer !

Untill now, I hadn't too much problem with the re-formatting of wp ... but now ... it juste decide to delete some code !!!!

why is the <i> balise deleted ??? (<i class="icon-camera-retro icon-large"></i>) 

 

Well , i have tried to fixe the probleme with wp-plugin: 

 

- wpautop

-PS Disable autoformating

-toogle wpautop

-preserverd htmleditor markup

-no wpauto

 

 

NO one woks ..... :-(((( .

is there no way that wp not delete the i balise <i> ?

Share this post


Link to post
Share on other sites
Simon

Its got nothing to do with autop etc, its the javascript tinyMCE editor that WordPress uses.

 

The visual editor never was and never will be designed for editing HTML code, thats what the text editor is for.

 

Switching between them you will lose formatting, its guaranteed and is a well known bug/feature of the editor.

 

If i were you i'd just disable the visual editor altogether ;)

Share this post


Link to post
Share on other sites
Objectif-Mariage

Yeah , it seem to be the best option .... 

But i have found the solution !!! =D

Well, i was looking for a pluging wich could allows me to activate and desactivate the Visual éditor (I think a good way could be to use the visual editor to start the page (going more quickly) and then use the HMTL editor and not coming back ) . 

Well , i was searching a such pluging, when i found ....... WP VISUAL ICON FONTS  ! it use exactly the same font that use pagelines (i think it's "free" fonts). And you could steel use the Viusal editor ...., What's fun , it's that it insert the icon in the visual editor, and , when you look at the code , it's almost the same that the code used by pageligne .... BUT

 

Pagelins suggest to use the code like that : 

<p><i class="icon-camera-retro icon-large"></i> icon-camera-retro</p>

but of course, you don't wan't a texte write next to your icon ... so you delete it =>And so the visual editor delet the ligne ...

 

=> this pluging, use 

&nbsp;<i class="fa fa-camera-retro"><span style="color:transparent;display:none;">icon-camera-retro</span></i>&nbsp;

 

the "&nbsp;"is automatically deleted by the visual editor (when you switch betewen visual and html), so have no use.

=> so real difference is the use of the div <span> who seams to "protect" the <i> div... (i think it's because there is somthing wright)

 

Indeed, if you delet the div <span> with it's content, this div <i> will be erased by the visual editor.  

 

Conclusion : 

If you wan to use an icon with out text after , you have to"put" a stuff in the <i> balise like a transparent div <span> with something write. 

 

=>  <p><i class="icon-camera-retro icon-large"></i> icon-camera-retro</p> ) , you have to include a div span, with some thing, so you have at the end : 

 

<p><i class="icon-camera-retro icon-large"><span style="color:transparent;display:none;">need something here</span></i> icon-camera-retro</p> 

 

 

So , i admitted it's not an elegant solution ... but it's a solution that allowed you to keep the visual editor (witch has deflauts, but is some time great useful) .

Share this post


Link to post
Share on other sites
Danny

I really don't understand the use of that plugin to be honest. If you want to use HTML, you have to use the Text Editor and never switch between the two.

I wouldn't be very confident in a plugin allowing me to use HTML in the Visual editor, if that is indeed what it does.

 

I would highly recommend just using the Text editor.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×