WordPress.org

Support

Support » How-To and Troubleshooting » How come I never get an answer about WP’s awful editor?

How come I never get an answer about WP’s awful editor?

  • I’ve left this before and NEVER get a response, so what’s the point?

    Every time I post a new piece it ends up with a sh*tload of these at the end of the doc? These from the latest. They’re not in the original doc so I assume WP in its ‘wisdom’ thinks I need them.

    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>
    <p><br class="spacer_" /></p>

Viewing 15 replies - 16 through 30 (of 65 total)
  • Ok, I’ve inserted the code but what happens to the output?

    If you comment out the sections of code I noted above and make sure that all text is contained in a paragraph tag (which is valid html anyway) then the editor works perfect, at least it has for me.

    It stops adding additional paragraph tags and leaves the code as you enter it. So if you add additional blank lines and you have the option checked to stop removing those tags, then they are left in AND you don’t get the annoying extra tags that it had been inserting every time you save.

    For someone who runs an image-intensive blog whilst traveling around the world using slow connections in internet cafes, this bug is THE MOST ANNOYING aspect of WP. It is seriously driving me nuts.

    Please, I beg Andrew Ozz the developer, or anyone else with the know-how to please, please, please take a look at this problem. Please!

    Thank you!

    For what it’s worth – I second this complaint.

    I’ve tried enabling/disabling the <p> + </ br> option in TinyMCE settings page, and just for yucks ‘n giggles tried FalconsFan code mod.

    Sadly neither produced the desired result.

    Oh dear, I do wish this could be fixed, it’s madly annoying.

    I too tried FalconsFan’s code to no avail. I just can’t emphasize enough how frustrating this bug is, especially on my crappy GPRS connection here in India. Imagine every time I save a draft a few new blank paragraphs are added to my post. I then have to go through and delete them all, only to have new, different random paragraphs added when I try to save my amended version. It is ruining my productivity and costing me hours of wasted editing time.

    Tiny MCE Advanced plugin has an option in its settings: Stop removing the <p> and
    tags when saving and show them in the HTML editor
    works for me

    I’ve got somewhere with this.

    2 files need to be changed.

    • Open /wp-includes/formatting.php
    • Go to function wp_richedit_pre.
    • Replace it with:
      function wp_richedit_pre($text) {
      	// Filtering a blank results in an annoying <br />\n
      	if ( empty($text) ) return apply_filters('richedit_pre', '');
      
      	$output = convert_chars($text);
      	$output = wpautop($output);
      	$output = shortcode_unautop($output);
      	$output = htmlspecialchars($output, ENT_NOQUOTES);
      
      	return apply_filters('richedit_pre', $output);
      }
    • Open /wp-content/plugins/tinymce-advanced/tinymce-advanced.php
    • Go to function function tadv_htmledit.
    • Replace it with:
      function tadv_htmledit($c) {
      		$tadv_options = get_option('tadv_options', array());
      
      		if ( isset($tadv_options['fix_autop']) && $tadv_options['fix_autop'] == 1 ) {
      			$c = str_replace( array('&', '<', '>'), array('&', '<', '>'), $c );
      			$c = wpautop($c);
      			$c = shortcode_unautop($c);
      			$c = htmlspecialchars($c, ENT_NOQUOTES);
      		}
      		return $c;
      	}

    I hope that solves the problem for you!

    Hmmm, so to get a decent editor I have to hack code? I think not.

    I still find it amazing that a piece of software that reputedly has a million users, something so fundamental to publishing as its editor is so awful but above all time-consuming.

    Things like for example:

    I include an image and want to add a caption to the image but ONLY if it’s NOT centred or if the image is a link, then I can paste the caption in til hell freezes over but no go.

    I really feel the whizzkids, rather than yet more ‘bells and whistles’ need to address the fundamentals first, but then perhaps they don’t write?

    And why do we have to rely on the TinyMCE plugin, surely building the editor at source is preferable?

    Bill

    TinyMCE Advanced, using tables is horrible. I have to hit backspace to delete invisible spaces (text cursor doesnt move to delete any visible space) before saving or I get extra spacing. If I even open the page and change any portion I have to remember to tediously click that area and hit backspace.

    just wanted to say that i did those simple code hacks listed above and everything is working much better 🙂 thanks!

    Has anyone implemented aizatto’s work-around, above, and then found that certain Ajax functions are no longer working with WP 3.0 (specifically custom fields and replying to comments)?

    Also sometimes when I edit a post in Visual mode, the body text displays HTML code.

    Basically aizatto’s solution worked for me but may have caused other problems. Also I’m not happy about messing around with anything in wp-includes folder. Mods have previously seriously warned against solutions like this.

    We have a site with this problem and it’s really driving me nuts. Normally we don’t need to use TinyMCE Advanced, or at least can let it remove <p> tags without any problem.

    However, we have one site where we need to put a lot of anchors on pages. TinyMCE advanced is great for that, but WP keeps editing the format of our anchor tags to a format that doesn’t work in IE.

    Only solution we’ve found is to tick the box ‘do not remove <p> etc’, but this causes the same prolem as above now that we’ve upgraded to WP3.0. It keeps adding the following in the page code:

    <p><br class=”spacer_” /></p>

    It seems to happen when you edit in visual mode, particularly on posts with captions on images.

    Is there any solution to this that doesn’t involve hacking code?

    Yes, the <p><br class=”spacer_” /></p> seems only to affect posts that contain images or videos. It seems tinymce can’t handle these properly. The worst thing about it is the time spent going back and editing the damn thing often over and over again to remove the unwanted blank lines.

    On the other hand if you want to ADD a blank line, tinymce will strip them OUT!

    Did someone try this out?
    wordpresstips.googlethem.com/paragraph-spaces-in-wordpress-editor-how-to-make-space-between-paragraphs/

    rajivvishwa:

    I checked out the tip and it means that you have to switch between source and wysiwyg and I’ve noticed that when you switch between the modes and do a save, tinymce puts the spacer code back in again.

    Even if it does work (I’ve not tried it yet), it’s a very clumsy solution.

    Far better to modify the appropriate tinymce code.

    B

Viewing 15 replies - 16 through 30 (of 65 total)
  • The topic ‘How come I never get an answer about WP’s awful editor?’ is closed to new replies.