Forums

Copy/paste dropping code/formatting in visual editor (2.8.4) (3 posts)

  1. JeffryPilcher
    Member
    Posted 3 weeks ago #

    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="http://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="http://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="http://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 -- "http://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="http://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.

  2. esmi
    Member
    Posted 3 weeks ago #

    Use the HTML tab for entering markup - not the Visual tab. And don't switch back & forth or you'll lose your markup again.

    The Visual tab is not for markup.

  3. JeffryPilcher
    Member
    Posted 3 weeks ago #

    I'm not using the Visual Editor for markup. I'm not that stupid, I promise. I'm showing you what the HTML would look like.

    To be clear: I'm copying stuff that's been formatted already in the Visual Editor. When I go to paste it -- again, in the Visual Editor -- it is dropping the formatting and/or truncating the IMG SRC. What I'm showing above is a BEFORE and AFTER look at the HTML. I copy/paste, see something is messed up, then look at the HTML and wonder where the markup went.

    This happens when I try to copy/paste an image from one location to another within the same post.

    This happens when I try to copy/paste copy I've assigned a certain CSS class to.

    This DOESN'T happen when I copy/paste <em> or <strong> text.

Reply

You must log in to post.

About this Topic