Copy/paste dropping code/formatting in visual editor (2.8.4)
-
There are three separate types of problems I’ve repeatedly encountered since upgrading to 2.8.X.
============ FORMATTING LOST ============
In the visual editor, when copying something that would (in HTML) look like this:
<h3 class="subhead">My Text Goes Here</h3>
Then, when pasted, ends up like this:
<h3>My Text Goes Here</h3>
============ IMAGE ALIGNMENT LOST ============
In the visual editor, if I copy an image that has an alignment setting, like this:
<img class="alignright" src="https://thefinancialbrand.com/wp-content/uploads/2009/11/image-name.jpg" />
Then when I paste it, it drops the HTML that sets the alignment:
<img src="https://thefinancialbrand.com/wp-content/uploads/2009/11/image-name.jpg" />
============ IMG SRC PATH TRUNCATED ============
Also in the visual editor, whenever I copy an image, like this:
<img src="https://thefinancialbrand.com/wp-content/uploads/2009/11/image-name.jpg" />
Then when pasted, for whatever reason, the initial part of the path gets replaced with two periods/dots:
<img src="../wp-content/uploads/2009/11/image-name.jpg" />
This has created an irritating problem. WordPress automatically substitutes the “..” with a path for that day — “https://thefinancialbrand.com/2009/11/04”. Then when the post is assembled, WordPress tacks that in front of the rest of the IMG SRC path.
If you view the published page source code, the IMG SRC path looks like this:
<img src="https://thefinancialbrand.com/2009/11/04/wp-content/uploads/2009/11/image-name.jpg" />
But in the HTML editor, all you see is:
<img src="../wp-content/uploads/2009/11/image-name.jpg" />
As you can imagine, WordPress will not be able to find a “wp-content” folder in the “2009/11/04” path, so the image won’t load/display.
============ HELP, HELP!!!! ============
The only workaround is to copy-paste in the HTML editor — pain in the ass. I can’t believe that any plugin I’m running would affect so many things specific to the visual editor.
Has anyone else run into this? Can anyone recreate this issue? It’s maddening.
- The topic ‘Copy/paste dropping code/formatting in visual editor (2.8.4)’ is closed to new replies.