• Hello all,

    A perennial peeve that I’ve had with WordPress is that the WYSIWYG editor absolutely insists on cleaning up my formatting for me. Namely, some times I want to insert more than one line space between lines of text or pictures, but the editor always removes them. Generally, this leaves my formatting disorganized, especially when I intersperse images with text. It even removes nonbreaking spaces.

    There does not appear to be an option to turn “clean code” off. I’ve tried many hackarounds – tables, unordered lists, horizontal rules, etc. but all they do is add to the clutter and things to remember when I make a new static page.

    It seems like such a trivial thing to make an option to switch “nanny mode” off. Some times I want the ability to insert what WordPress considers an unnecessary line, since it fits the style of what I write, which is generally “photo-journal” style. This has been a problem for me for years, ever since I first started using WP, and would be the only thing which would cause me to move away from it.

    I sincerely hope it’s just a check box or option somewhere I missed. If so, can someone direct me to it? Else, I would like to strongly voice a feature request to make the WYSIWIG less commanding by default. Are there WP plugins that bypass the regular editor and have this feature?

    For what it’s worth, I really do not consider CSS and PHP hacking to be a viable solution. I’m not a coder by nature or profession, so unless it’s a one-line insert to be done once to enable such an option, I’m not sure a “modify this WP system file” solution is within my grasp.

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • there are alternate plugins…. I’m not sure if they fare any better. such as dean’s fckeditor or tiny mce advanced, you can try those

    Otherwise, its an issue that has been brought up many times. There is no simple answer. I usually post in html mode, using divs where I want space, which I have defined in my css. But it doesn’t sound like you like that option.

    I have read around the WP-o-sphere that an alternate editor is being looked at/worked on, so there is hope. But until then, it is what it is unfortunately

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Proper HTML note here – You should NOT be using blank lines for formatting anyway. The correct way to put in multiple blank lines would be <div style="clear:both;"></div> or <br style="clear:both;" />

    If you’re using HTML editor, you can use Post editor Buttons to make a new button for yourself.

    If you’re using the GUI text editor, TinyMCE Advanced may help, as it supposedly has an option to kill that.

    Thread Starter teamtestbot

    (@teamtestbot)

    ipstenu,

    Thanks for that tip. I just tried <br style="clear:both;" /> and it works to my liking. A little inconvenient, but satisfactory until WP fixes this little flaw.

    Now, if there were only a way to tell WP to just insert that whenever I hit Enter… I know it’s “not proper HTML”, but some times I just want more than one blank space.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    There’s a way. I’m blanking on the code for it, but basically you can add a line to your functions.php file to tell it to stop stripping extra br’s… The TinyMCE plugin has it included as an option.

    ipstenu

    please unblank on that fix and post it here

    and while you’re at it, please find one to stop WordPress stripping the second space after the full stop at the end of a sentence – I type correctly formatted prose, not SMS shortform.

    Many thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Read this: https://wpquestions.com/question/show/id/380

    Which basically says the best way is the TinyMCE plugin. Or someone else can crack the plugin open, figure how THEY coded it, and rip it out. I don’t care enough to try ??

    please find one to stop WordPress stripping the second space after the full stop at the end of a sentence

    That’s not WordPress. No, seriously. It’s HTML. I double space too, all the time, and it ALWAYS vanishes. On every CMS I’ve ever used (even plain HTML IIRC). I forget why, but it’s always been that way.

    Possibly because Web != Print?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    There was some other justification back in the HTML 1 and 2 days, actually ?? It was beyond web != print and into ‘Extra spaces cause problems!’ but I can’t remember the lecture anymore.

    Yeah, that long ago ??

    I bow to your superior knowledge. I only go back as far as HTML 3.2. ??

    @ both – thanks for your comments.

    I’m not convinced it’s html doing it though, it doesn’t happen with Microsoft FrontPage – that keeps the double space both locally and after a publishing upload. Maybe that’s language related though? I always use UK British so cannot speak for using it with US English.

    It also doesn’t happen with forum scripts, at least, not with any of the ones I’ve used, and I’ve used most as either a webmaster or general user.

    I would love to hear the html 1 & 2 reasoning for failing to code for m-spaces (like the m-dash it’s a double character) because I cannot believe they failed to do that – it’s the most common “dipthong” in the written language of any Romanised alphabet, and a few non-Roman ones too. In English, it’s used even more than the “th” dipthong pairing.

    The double blank line issue, in the OP, however, is most certainly caused by WordPress, and like the OP, I would also like it to stop – currently I “hack” it by using a near-invisible single full stop on the blank line to force its retention, but that’s not ideal.

    As a webmaster, I’m fully capable of writing my posts on the html screen with all formatting, but when I’m writing, I’m doing so as a writer and want to stay in the WYSIWYG editor – the only time I jump to html being to layup tables and to tweak img positioning and margins, or a few similar tasks.

    As I said elsewhere, I’m sure that if WordPress managed to code the capital_P_dangit function, they could do the same with a double_space_dangit and a double_blank_line_dangit function … or, simply remove from the code, the lines that are “auto-moderating” those changes.

    Final thought for Ipstenu – I’m sure you’re wrong about it being html causing the loss of the m-space, that problem did not exist on the arpanet – yes, I used that too, and it’s military equivalent back when the European end of NATO was run on ICL mainframes and dumb terminals, rather than the IBMs preferred left of the pond.

    Good find by the way – https://wpquestions.com/question/show/id/380 – I’m engrossed trying to find the solution.

    Edit – fix typos (2 of them)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I’m not convinced it’s html doing it though, it doesn’t happen with Microsoft FrontPage – that keeps the double space both locally and after a publishing upload. Maybe that’s language related though? I always use UK British so cannot speak for using it with US English.

    Frontpage isn’t HTML. No, Im not being snarky, I’m 100% serious. They DON’T use proper HTML standards, they use their own weird code, and somewhere in their hacked up fugly sh** they spew forth double spaces after periods. But by doing so, they make their resultant code unusable on most non-IE browsers. So you can’t use them as an example.

    Final thought for Ipstenu – I’m sure you’re wrong about it being html causing the loss of the m-space, that problem did not exist on the arpanet

    Mmm. I’m not 100% sure about that, and I bet neither of us have access to go look ?? IIRC, arpanet didn’t render HTML the same way a broswer does, which … well, it’s something I can’t fathom that ALL web browsers would get together and agree on something like this ?? I always use double spaces, I’ve never seen them reproduced correctly except with FrontPage and exporting Word Doc to HTML. Neither of which I consider ‘proper’ HTML. If we’re talking pre-standards, then it’s all out the window, and arpa was really pre-standards ??

    Also, LYNX defaults to what we now call ‘preformated’ text. Which is (get this) violation of standards ?? And yes, dumb terminals essentially use LYNX. Out of scope, behaving NOT as HTML was designed. They’re wrong.

    The default of the white-space attribute (i.e. what you get when you DON’T define it) directs user agents to collapse sequences of white space, and break lines as necessary to fill line boxes. This includes double-spaces after periods. Tabs, spaces, and line breaks OUTSIDE of <pre> tags are all treated as one space on all browsers, as this is what html should be like. There are some mentions about this on w3c.org but it’s been the case for decades, so most of us just grin and go. Or use & nbsp; if we need to be snide about it ??

    Violators will be strung up by blink tags.

    (FWIW, why do some modern forums allow it? Well their code is insane and the overhead isn’t worth it, IMO. WordPress doesn’t remove the double space, it remains there in this post and my blog if I edit it. It just permits the browser to render as designed. Take it up with Mozilla.)

    Edited to add: It’s not HTML persey, it’s browsers obeying HTML/W3C standards. Dreamweaver won’t even let you put in doublespaces.

    The issue with double spaces is simple. Browsers collapse contiguous whitespace. Otherwise, you wouldn’t be able to indent your code, now would you? This is the part of the HTML standard. You will need to use &nbsp; manually if you really want double spaces — and you can certainly write a short plugin which does that.

    White space is collapsed by design. In days of old people used fixed tables to position stuff where they wanted it. These days you can use CSS to much the same effect. (Or   as others have mentioned.)

    Yeah people complain about WordPress changing this thing or that thing, but I’ve noticed they don’t mind too much when it alters the stuff that they want altering.

    People are just fussy, you can’t please them all.

    I have raised this issue over at the TinyMCE forum and they are saying that it is an issue with WordPress’s specific implementation of TinyMCE …and that it is not a native TinyMCE problem at all:

    https://tinymce.moxiecode.com/forum/viewtopic.php?pid=85157#p85157

    An example of the problem is that I can’t do this:
    <div style=”clear: both;”></div>
    …to get a “clear” and many variants of
    are removed also.

    I agree that this must be considered a very serious BUG and not just an example of “fussy people”. If wordpress’s implementation of the TinyMCE HTML editor is going to end up losing so much HTML code when the user switches over to “Visual” then it should at least be thoroughly documented somewhere – preferably with an explanation on how to disable this behavior. It’s quite obvious that users are spending hours/days trying to figure out what’s going on and how to make it do what they need to get done.

    This is my pet peeve with WordPress too, that there is not a space between paragraphs. It gets automatically removed – ugh!

    So I usually put a “.” (that’s right, a period!) between lines to get the spacing when I click “Enter” in Visual mode.
    Clumsy as ever, but it works.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to make the editor stop removing blank lines’ is closed to new replies.