Disable html rewriting in visual editor

  1. penmaster91604

    It would be nice to be able to disable html rewriting in the visual editor in the blog admin settings. Examples: (1) If you encode an email url with ascii encoding to protect from spammers, the visual editor will strip out the codes and replace them with the actual text rendering it useless. (2) If I paste a Google map or street view or YouTube video as an iframe in a post, the WordPress visual editor will strip it out. (3) If I use regular html p tags or line break tags, the visual editor will strip them out.

    Posted: 6 years ago #
  2. Max Chirkov

    Check out this plugin http://wordpress.org/extend/plugins/html-mode-locker/

    Posted: 5 years ago #
  3. donmcleman


    Why has this still not been sorted out?

    Posted: 2 years ago #
  4. Ipstenu (Mika Epstein)

    Because we use TinyMCE and the problem is upstream of WordPress. Someone needs to fix that for a total solution.

    Posted: 2 years ago #
  5. JoeGP


    google maps and youtube iframes do not get stripped out, not that i have noticed anyway,
    but lots of other stuff does, like using '%nbsp;' to create an extra line/space, gets removed if i insert it myself in the text editor but not if i use the visual editor and press enter instead.

    Also let's be honest the visual editor is a piece of garbage, you can never get anything where you want it using that, unless you make very simple posts with plain text and 1 or 2 images, left or right aligned.

    I had to learn quite a bit of html to get things looking like they should, compare that to squarespace where you don't have to learn anything.

    I only use the visual editor when it doesn't screw up my work and i need to proportionately resize an image or quickly stylize some text (color, underline, etc.) or if i'm pasting from a Word doc.

    Posted: 2 years ago #
  6. Ipstenu (Mika Epstein)

    Don't use nbsp; for spaces. HTML doesn't need double spaces. Also extra 'lines' are done by shift-enter in the visual edit.

    Also don't use iframes. Use embeds. Google Maps and YouTube aren't 'stripped' because they're parsed.


    Posted: 2 years ago #
  7. JoeGP


    Unfortunately the visual editor is really dumb, for example if i press enter after an H1 tag it creates another H1 tag that looks like another line in the visual editor but does absolutely nothing if previewed or published, same goes for center aligned text.

    Thanks for the Shift+Enter tip, that i didn't know, but it's the equivalent of a normal Enter in text/html view so it's not that new.

    Then what do you recommend for separating paragraphs ? it's what the visual editor uses (when not being dumb) and of course if i use   in the text editor then it removes it, but if the visual editor uses it then it leaves it alone, makes no sense.

    "Also don't use iframes. Use embeds." ? now you make no sense, both youtube and google map embeds ARE iFrames !

    Well then make the editor "parse" everything i type in it so it doesn't get "stripped"

    Posted: 2 years ago #
  8. Ipstenu (Mika Epstein)

    I suggest using Oembeds for things.

    YouTube - paste the URL in as is, no I frame needed, and the I embed just works.

    You can use plugins for google maps.

    As for paragraphs... Use enter? They're paragraphs. Nbsp has no point, it's a space, and you don't need it for paragraphs.

    Posted: 2 years ago #
  9. tacudtap

    @JoeGP I have to say if you "had to learn quite a bit of html to get things looking like they should" in the visual editor; you're doing it wrong.

    I would suggest that the visual editor should only be used for basic content such as text, images, and (supported) embeds. More on those here: http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F

    Any extensive HTML markup that ends up getting stripped by TinyMCE probably shouldn't be in the content area in the first place. Markup is structural whereas content is a separate entity (IMO anyway).

    The theme should take care of markup that complex.

    Posted: 2 years ago #
  10. Pt

    I just want the bloody thing not to strip out   characters whenever the editor automatically opens in visual mode.

    For example, If I have an address in a narrow column and I want "South Australia" not to break in the middle, I should be able to use South Australia without fear of it being inadvertently parsed out.

    It is a "Non-Breaking SPace" after all. That's what it's for.


    Posted: 1 year ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    8 Votes
  • Status

    Sorry, not right now