We need a solution. This is ridiculous!!!
We need a solution. This is ridiculous!!!
This really did a great job:
Dean's FCKEditor For WordPress
I can't believe how disappointing the default WP visual editor is. Just awful.
The KCKEditor fixes the issue with the line-breaks!
Thanks for the hin!
To insert a BR tag in TinyMCE you press Left Shift + Enter (like in the more advanced text editors). That's it. It was mentioned several times here, but nobody seems to notice.
This currently doesn't work in Safari, as this browser is not fully supported by TinyMCE 2 (best option is to use FF on windows, linux, mac, solaris, bsd, os2, etc.) but TinyMCE 3 that's coming to WordPress soon supports it nicely.
Azaozz, I tried what you suggested and WordPress gobbled up the breaks. (Unless you're talking about the plugin, which I haven't installed yet.)
Hold down Shift and hit Enter. Easy as pie. But I use the FCKEditor, so I don't know if that works with the standard editor.
That doesn't work, aar0on.
I tried the FCKEditor and the TinyMCE 2.0 and didn't like either of them. TinyMCE was still stripping the line breaks (even after doing what was suggested above), and both are somewhat clumsy (to me), so I went looking for another solution. I found the TextControl plugin (link below) which does the trick without trying to insert its own editor.
Note that this is only a workable solution for future posts. If you have a new blog, awesome. If you have one with old posts, you'll have to set it to the WordPress default and change the processor in each post individually. A pain in the neck, but at least I can force a line break now.
Link to the plugin:
Hopefully this fault in WordPress's programming will be addressed in the next version. It's a real shame that we have to search for workarounds to do something so incredibly basic.
This problem was driving me nuts too. Unable to insert any line breaks anywhere. My posts where looking very gibberish without line breaks.
I was so frustrated, that I was ready to remove WordPress from my site and start looking for other blogging software.
But finally, I solved it myself.
I opened wp-includes/post-template.php
I found function the_content
and just *before*
I added this.
Edit: I uploaded the code here, because WordPress cannot display it correctly:
I wonder, it was so difficult for the WordPress developers to add this single line of PHP code, to allow us to enter line breaks in our posts? Even someone with very few PHP knowledge knows how to do this.
this issue initially got me into looking under the hood of WordPress... several portions of the fix have already been pointed out:
1) Use FCKE editor plugin
2) Comment out ALL of "wpautop" function in /wp-includes/formatting.php except the "return $pee;" line
[BTW, in response to oscarf's concerns, I have not seen any adverse effects of this when editing in FCKE. In fact, I only do switches to HTML source every once in a while now because it works so well, while leaving my custom code alone due to the wpautop fix. Now I would not recommend opening up a full version of FCKE to the public for editing, if that were necessary, do a separate install with an FCKE where you disable the "Source" button in the editor config file.]
A wonderful side-effect of this is that WP runs faster because this saves dozens of precessing intensive regular expression (regex) matching/replacing operations. wpautop when left on has about 20 of these that it runs PER POST! So on your index page with e.g. ten posts it could be 200 regex calls!
Also, there really is no reason for this big-brotherly review of people's HTML for some supposed compliance (especially if it has unforeseen bugs like these from not fully considering the effects of some of the "greedy" regex operators). If someone doesn't do HTML and uses the FCKE, etc. editor, they won't really be inserting custom HTML anyway so it's all good... if they do know custom HTML, then let them make all of the mistakes they want... they'll know soon enough...
In my mind, the wpauto function should be ditched in next WP revision... it's a bug/resource hog! Let them know.
Best - Alex
This topic has been closed to new replies.