• Hi all

    I hope you can help.
    For some reason the editor is adding in additional divs. I have tried this on a brand new install and it is still happening. To recreate it:

    1) Go to Text editor and add:
    2) Paste

    <div class="col-xs-6">Text</div>
    <div class="col-xs-6">Some text</div>
    <div class="col-xs-6">Some More text</div>

    3) Got to Visual, place cursor at the end of Some Text, type Here and press enter
    4) HTML editor will become

    <div class="col-xs-6">Text</div>
    <div class="col-xs-6">Some text</div>
    <div class="col-xs-6">Here</div>
    <div class="col-xs-6">Some More text</div>

    Holding shift and enter works fine but I can’t find a work around the standard enter key.

    Any help would be much appreciated.
    Mark

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do all of your text editor stuff, then press save, and then to your HTML editor. Switching between the two as you describe does cause anomalies.

    Thread Starter willcowd

    (@willcowd)

    Hi Andrew

    Thank you for the reply but I can see it happening in the visual editor as I’m doing it. (I have a dotted border around the divs)

    Thanks
    Mark

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    When you tried on a brand new install did you have any plugins activated?

    Thread Starter willcowd

    (@willcowd)

    Hi Andrew.

    Nothing, clean 2014 install running 3.8

    Thanks
    Mark

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Wait

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Block elements are added by default around inline elements, is that your concern? Or that the class was added as well?

    Thread Starter willcowd

    (@willcowd)

    It’s not the ideal thing to have the block elements but the class being added is the true problem as it breaks twitter bootstrap

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’ve replicated your issue btw. Never knew WP to do this. I’ll wait until someone more knowledgeable posts.

    I cannot replicate. I get this

    <div class="col-xs-6">Text</div>
    <div class="col-xs-6">Some text here</div>
    <div class="col-xs-6">Some More text</div>

    WP 3.8.1, Twenty ten with no plugins

    [edit] tested in twenty fourteen with same results as above.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘DIV's getting added by editor’ is closed to new replies.