WordPress.org

Ideas

Disable html rewriting in visual editor

  1. penmaster91604
    Member

    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: 3 years ago #
  2. Max Chirkov
    Member

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

    Posted: 3 years ago #
  3. donmcleman
    Member

    12345

    Why has this still not been sorted out?

    Posted: 11 months ago #
  4. Ipstenu (Mika Epstein)
    Administrator

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

    Posted: 11 months ago #
  5. JoeGP
    Member

    12345

    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: 9 months ago #
  6. Ipstenu (Mika Epstein)
    Administrator

    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.

    https://codex.wordpress.org/Embeds

    Posted: 9 months ago #
  7. JoeGP
    Member

    12345

    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: 9 months ago #
  8. Ipstenu (Mika Epstein)
    Administrator

    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: 9 months ago #
  9. tacudtap
    Member

    @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: 7 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    7 Votes
  • Status

    Sorry, not right now