• I’ve noticed when switching back and forth from the Visual Editor to the Code in WP, the code changes. Some of the HTML I wrote is missing or some tags have been added, etc.

    I’ve disabled the Visual Editor in WordPress so I can write HTML without it getting altered. This is all well and good, but the whole point of my using WP is so that my clients can go in and not look at code.

    I’ve been reading up on this and noticed this is a common problem. Many of the posts are not resolved. I’d like to know, what is the best option around this? How can I still write HTML in the code section and still have clients go in and change text, etc. in the Visual Editor without it messing up the HTML. What is the latest resolve on this? ?? I’d love to know.
    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The solution is to not switch between the visual and text editors while editing a single post. After saving you can go to the other one if you need to. (Not ideal, but that’s the generally suggested solution to this known issue.)

    In version 3.4.2, I always used the RAW HTML Pro plugin https://rawhtmlpro.com/. I haven’t tested it in 3.5.1, yet but according to the description page it is compatible.

    I had a client site where I had to do a lot of HTML coding to get the look and feel they wanted and when they tried to edit it things would go crazy. This worked like a charm. Well worth the $15.00 per year.

    Thread Starter carrly

    (@carrly)

    Interesting. Thanks for the tips.

    That plugin still doesn’t allow someone to edit the content in the Visual Editor but at least it preserves/protects the HTML more, and seemingly allows you to switch back and forth from Visual Editor to HTML view without any hiccups. At least that’s what I get from the description…I’ll have to try it out.

    Thread Starter carrly

    (@carrly)

    Ok, that plugin (raw) won’t really work. I would have to put all of my code in the raw tags and then the client wouldn’t be able to edit it in the Visual Editor.

    This site is not a blog (yet), so I’m talking about Pages and Page content areas. I only wanted to do it with WP so that the client can go in and edit text/images using the Visual Editor on the Pages. I have assigned styles to my p tags, etc. already. The site is already coded I am just converting it to WP.

    Is there a decent solution to create editable content areas/blocks, as in, the client can use the Visual Editor, and the code I have written can stay intact? Is Multiple Loops the answer?

    optimized-marketing

    (@optimized-marketingcom)

    I am having the same issue. It was causing me problems awhile ago, then went away for awhile. But have recently been causing me issues again. Not really sure why switching back and forth between text and html changes the html at all. Even with the wpautop function it shouldnt remove HTML only add. At one point I had to edit over 50 pages that had the <p> tags removed automatically. This is not acceptable for wordpress to act this way. I dont want a plugin solution, this should be resolved by WordPress. It has been a known issue since WP v2.X.

    Having the same problem. I was using Raw HTML Pro about a year ago, and was able to toggle between Visual and Text Editor without any change to HTML tags. I’m using WP 3.5.1. Not sure when this changed, but now my p tags are being stripped out. I’ve enclosed my PHP in raw shortcodes, so that is safe.

    I repurchased Pro yesterday, hoping that the updated version would fix the problem, but tags are still being stripped out.

    Anyone have advice, besides NOT switched between the editors? Both codes and users need to access the page content, so that doesn’t work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Visual Editor Changing HTML’ is closed to new replies.