• Hi All,
    I have seen a number of threads relating to this sort of thing but I can’t seem to find any answers that resolve this for me.

    While I’m editing pages I often jump between the visual and the text editors to do different things, but sometimes when I do this, tags such as &nbsp and br that I’ve added in the text editor because I can’t always get the spacing I want through the visual editor are removed the next time I go back to the text editor. When I next save the changes, my layout is all over the place.

    The odd thing is that it only sometimes does this and other times it doesn’t seem to and leaves my formatting in place. At the moment I have a page that I’ve used &nbsp on and at the moment it seems to be leaving it alone.

    I do use the TinyMCE Advanced plugin and have seen comments that you can disable this behaviour to some extent in the settings but I’ve found that using that option makes the text editor even harder to use because it clumps everything together.

    Any advice on what I can do about this would be greatly appreciated.

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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thread Starter matt2015

    (@matt2015)

    Thanks Andrew. That sounds like it could be what I’m looking for. I will look at it more when I get the chance.

    Thread Starter matt2015

    (@matt2015)

    I’ve been looking at the support forum for that plugin and it looks like there’s quite a bit of fixing to do after you’ve installed it and it sounds like it could mess up the layout so I’m not too sure about using it.

    Also it looks like it could cause problems with nextGen Gallery which I have installed.

    Is there code like &nbsp, br etc that I could use for spacing and layout that the editors won’t clean up?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I would recommend using CSS for the spacing – you can separate that out into another stylesheet or install a Custom CSS plugin to manage your CSS modifications.

    Thread Starter matt2015

    (@matt2015)

    I’m trying to avoid complicating things too much for myself and I’m not great with CSS, plus I don’t really know if making my own styles would help as there is no real set pattern I could specify. For example I was using &nbsp to push text below an image and to maybe add an extra space at the end of a bit of text before the hr/ so it looked neater and less squashed up. Sometimes it only needs 1 &nbsp and sometimes 3 or 4 to position things how I want them.

    If I put things like &nbsp and br inside div tags will that help or will they still be tidied up?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For example I was using &nbsp to push text below an image and to maybe add an extra space at the end of a bit of text b

    It sounds like you may be able to display ‘block’ the image and then give some bottom margin to that image to achieve the same effect. I’m peddling this CSS stuff because it’ll help things for you in the future and avoid this stripping issue. We can always help you with CSS modifications, you just need to link us the webpage with the problem.

    Thread Starter matt2015

    (@matt2015)

    Thanks Andrew. I’m not too keen on making the address available on here though.

    Thread Starter matt2015

    (@matt2015)

    Have installed the Simple Custom CSS plugin but I have no idea how to set a new style up. How can I add block padding around the image?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you link us to the theme’s demo site that has an image in a post?

    Thread Starter matt2015

    (@matt2015)

    This is the demo page https://preview.themezee.com/air-balloon/ and what I’m trying to do is like the Latest News section on that page however I am doing it with a small image on the left and the text wrapping around it on the right. Finished off with an <hr/> and the next news item starts under that.

    If there isn’t enough text to push the <hr/> below the image, the <hr/> appears to the right of the image under the text and it all looks a mess so I have been using &nbsp; to push the <hr/> to below the image so it looks better.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘HTML editor removing tags and messing up my layout’ is closed to new replies.