WordPress.org

Ideas

Disable html rewriting in visual editor

  1. Ipstenu (Mika Epstein)
    Administrator

    That's also what CSS is for. You can set the CSS of your columns not to break space: http://www.w3schools.com/cssref/pr_text_white-space.asp

    Posted: 2 years ago #
  2. JoeGP
    Inactive

    12345

    @Ipstenu
    You can't control the size of the youtube video being shown if you only use the URL unless you add a plugin or some other code, so i'll just stick to iframe embeds thank you very much.

    A plugin for google maps ? why ? no, embed code is all i need, and again precise control over size is needed.

    @tacudtap
    oh so you're saying that the visual editor can divide a page in 2 or 3 for me ? add a border around some text ? make the text bigger without making it a H1 tag ? use a different font ? add a horizontal line ? center some text next to an image ?
    NO, i had to learn the html for all of those.

    And i get what you're saying about the markup, the theme should take of most of it, but it does so in a general way and you don't always want that, so the only thing to do is use the text editor and good old html coding.

    -----

    Until the visual editor is as powerful, accurate and complete as something like what PowerPoint uses nobody can say anything to deny it's broken.

    But like bncpeter said, at least stop stripping nbsp out, that would be a huge improvement.

    Anyway it's pretty apparent i'm wasting my time here.

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

    You can't control the size of the youtube video being shown if you only use the URL unless you add a plugin or some other code, so i'll just stick to iframe embeds thank you very much.

    [embed width="123" height="456"]http://www.youtube.com/watch?v=dQw4w9WgXcQ[/embed]

    No plugin needed. Built into WP. Yes it's 'some other code' but you don't need an iframe and can use it in the GUI editor :) (Not all user roles can paste in iframes after all).

    But the point I'm trying to make is that most of the things you mention can be done in the GUI. I personally find it easier to use HTML, but re-learning the formatting tricks in the GUI editor, sometimes using the plugin TinyMCE advanced, can work for the majority.

    And for the rest? Well. Yes. We know that switching back and forth between the GUI and the Text editor mucks up code.

    Until someone can perfect something else, this is actually far far better than we use to have. It's constantly evolving and working and changing.

    We disagree it's broken. It's doing an amazing job.

    But we don't deny it's massively imperfect.

    Posted: 2 years ago #
  4. mattsaul
    Inactive

    I think I found a solution to this. I created a plugin called Ignore Code which keeps the visual editor from touching your code when you switch between text and visual mode. You can find it in the plugins directory. The down side of this is the code won't show up in the visual editor at all.

    Posted: 1 year ago #
  5. kevinruffus
    Inactive

    Just something to think about:

    Let's say you have a link in your basic text, but want to add a title attribute to it.

    The built in editor doesn't support multi-line titling, so the html code has to be inserted, eg: title="Norse-Corp Live Attack Site& # 1 0 ;http://map.norsecorp.com/#/"

    (I had to space out that code because even this stripped it out, regardless of how I formatted it)

    That lets my clients know the site I intended the link to go to, gives a short description (again, verification) and they can compare it with the link that the browser brings up when it's hovered over. If something got highjacked (unlikely), whoever did it would likely forget to change that.

    I am not a web developer, and have very little experience with this. I've googled how to do nearly every single trick I wanted our site to do, and played until it worked.

    This crap of stripping out code that it thinks isn't necessary is making translating/transferring/rebuilding our site to WordPress far more frustrating than it should be.

    I'm all for simplification, and making it simple to use, but let people who want to tweak and play turn off the dummy protection.

    Posted: 1 year ago #
  6. Erutan409
    Member

    This was a viable fix for me:

    add_filter("tiny_mce_before_init", function($init){
    	$init["extended_valid_elements"] = "*[*]";
    	return $init;
    });
    Posted: 8 months ago #
  7. kenny1983
    Member

    Until the visual editor is as powerful, accurate and complete as something like what PowerPoint uses nobody can say anything to deny it's broken.

    This crap of stripping out code that it thinks isn't necessary is making translating/transferring/rebuilding our site to WordPress far more frustrating than it should be.

    I'm all for simplification, and making it simple to use, but let people who want to tweak and play turn off the dummy protection.

    I couldn't possibly agree more with both of these comments! Honestly, I understand that WordPress is designed primarily for blog sites, but it's commonly touted as being great for simple static sites too. And this IME is completely false.

    I feel like I'm constantly jumping through hoops just to get my HTML to display the way I have written it. Whether it's a 15-minute long search for the right file to override in my child theme, or the incredibly frustrating issue of the TinyMCE editor constantly thinking I'm a $#*&ing moron (when in fact it's developers seem to be), I have almost had enough of WordPress altogether!

    If only I didn't find the plugins and other advanced features so helpful, I would completely uninstall it from my web server. But needing 3 plugins just to make the dev experience not entirely exhausting is code bloat that I neither want, nor should have to subject my users to the performance impacts of.

    Thanks to Erutan409 for the fix suggestion, but unless I later decide to use the visual editor for inserting images or something (not likely since even those features are broken), here's my workaround for others that just want to create a basic static site:

    1. Create a "page-{slug}.php" or page-{id}.php" file in your child theme's root directory for every static page you want on your site.
    2. Insert "get_header()" and "get_footer()" in each of those files, with the page HTML in between (assuming, of course, that you have child theme "header.php" and "footer.php" files to get around two other useless WP dashboard features).
    3. Say good riddance to the WP visual editor once and for all, and only use the dashboard for creating (but not editing) pages, defining their slugs, adding plugins, etc.
    4. Do all your actual coding in your favourite PHP IDE and save yourself from constant headaches!
    5. My apologies if my words seem harsh or offensive to anyone, but seriously WP/TinyMCE devs, what gives?!?!

    Posted: 3 months ago #
  8. Ipstenu (Mika Epstein)
    Administrator

    Have you checked out Gutenberg?

    https://wordpress.org/plugins/gutenberg/

    Posted: 2 months ago #
  9. kenny1983
    Member

    Thanks ipstenu, I'll definitely check out Gutenberg when I have a chance. At first glance though it certainly seems like a very handy plugin!

    Posted: 2 months ago #
  10. Ipstenu (Mika Epstein)
    Administrator

    The goal is for it to be in WP 5.0 so for those of you saying "Another plugin!?" please keep that in mind. It's a feature as a plugin :)

    Posted: 2 months ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    9 Votes
  • Status

    Sorry, not right now