Found the suggestion that Tiny MCE editor could be hacked to permit line breaks.
If you use shift-enter instead of enter you should be in luck. Depending on your configuration, you might also have to edit the initialization settings in the js/tinymce/tiny_mce.js file and change these values to reflect:
I think I finally figured out which lines to modify, but it doesn’t work. As far as I can tell “shift-return” does absolutely nothing ( i.e. it’s the same as “return”). I think that’s some sort of PC thing.
Please can someone tell me how do you force line breaks using a Mac?
(p.s. The WP 2.0.2 installation is on a Linux server and locally on my Mac for testing, neither works.)
Any other Mac users figure out how to force line breaks in WordPress 2?
Actually, I give up. Even disabling the rich text editor won’t stop this thing from stripping out my line breaks.
How do you un-install this TINY MCE thing so you can just write your own xhtml?
or do I have to downgrade back to WP 1.5?
Just disable it.
As admin, click on Users.
Scroll to the bottom of the page. Uncheck the box that mentions use RTE editor…
I’ve already tried disabling the RTE (i.e. rich text editor). It doesn’t work. The darn thing continues to strip out line breaks and every other suggested work-around to make a line break.
E.g., I’ve even tried making an invisible class in my CSS and the blasted thing will strip out my invisible paragraphs and spanned text from the posts and pages.
<p class="invisible">gosh darn it I want a line break here!</p>
gets stripped out! Poof! Just removed from the post!
As the Smiths put it in song years ago it’s “enough to make a shy, bald, buddhist reflect and plan a mass murder”.
I’d really like to delete this text editor now. If anyone can advise how to get rid of it I will be very grateful.
First method was (as Admin)
a) In Users > Your Profile> Personal Options deselecting “Use the visual rich editor when writing”
b) In Options > Writing deselecting all 3 choices under Formatting “Users should use the visual rich editor by default”, “Convert emoticons like 🙂 and 😛 to graphics on display”, “WordPress should correct invalidly nested XHTML automatically”
It didn’t work on 3 installations: 2 Linux shared hosting sites, and my local OS X copy.
Second method was
a) hacking the above mentioned js/tinymce/tiny_mce.js file as described in that linked thread. I deleted the file then ftp’d the modified one to the site.
edit the initialization settings in the js/tinymce/tiny_mce.js file and change these values to reflect:
The problem is consistent on 2 installations: a Linux shared hosting site and my local OS X copy. It’s as if nothing was changed in the hacked tiny_mce file on the sites compared to the 3rd installation with the un-hacked copy of the file.
Shift-enter does nothing; that’s some Microsoft thing.
p.s. forgot to add, I’ve tried inserting a line break in Safari, Firefox, and Opera.
@ciryaquen: It appears not to be just a Mac or linux thing.
I’ve been trying to get my arms around this for a while now. Earlier today, I tried #2 you mentioned above and tested in MSIE6 and FF1.5 in Win XP Pro SP2. (I already use method #1).
Here’s what I tried –
this.defParam("doctype", '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
FMI, here’s the link to the moxiecode reference for the configs above:
The doctype default was set to html 4.0…? and not even with a DTD using a URL.
But nothing above helped. I also modified the
this.defParam("valid_elements","");to allow better xhtml markup.
I wonder if the tiny_mce_gzip.php plays a role, but I can’t find any documentation about the changes made to it for the port to WP and what role it plays.
My main complaint is the RTE html source editor and the non RTE editor would change my html to use
</p>without the opening tag instead of the
<br />I wrote. And it would try to wrap everything into a paragraph.
Now after the changes I made to tinymce, it doesn’t try to wrap everything in a
<p></p>but uses my source div’s as a container for text.
For example, assume I have a container div and I want to insert text following the opening div tag. Before changes to the tiny_mce.js file, I’d get this garbage with and without the RTE on
Text for testing </p>
<h2> blah blah h2 header</h2>
With RTE on TinyMCE changes the html source like this after uploading the modified tiny_mce.js
<div id="CSS-P">Text for testing</div>
<h2> blah blah h2 header</h2>
when the correct source should be
<p>Text for testing</p>
<h2> blah blah h2 header</h2>
The site I’m working on validates because I stopped using
<br />or empty
<p> </p>while pasting my code into the “non” RTE form – they’re not well-formed xhtml in the strict sense anyway. It just means more CSS.
While pasting my html into the “non” RTE is ok for me to develop the blog’s initial look and feel, when the end-user gets it and edits pages, creates new posts, and etc., it appears that the Rich Text Editor, will make a mess of the code.
Worse case is it disrupts the layout and accessibility.
MaineWebwo, I followed the link, but I’m afraid almost everything on that moxiecode site is over my head. I’m an amateur.
All I know is that I never had this problem with WP 1.5, and that turning off the RTE in WP doesn’t exorcize Tiny MCE’s interference with my code.
All I want is to use a line break. Why should that be so hard?
Someone please tell me how to un-install Tiny MCE from WP 2.
I’m using WP 2.0.2 on a Linux server and use Mac OSX Tiger for admin and have no problem doing line breaks with QuickTags.
Of course I can only *see* the QuickTags with Firefox, not Safari …
Anyway to add a line break on a Mac you use Shift-Return. That’s a typical “soft return” (line break) keyboard shortcut found in most design programs as well. I don’t know why it’s not working for you.
I just checked and when viewing the HTML that the quicktag made, it used
<br />. (hope that code made it through … trying to enter the XHTML code for a break tag.)
btw I might be confused re quicktags vs rich tag editor. I’m a newbie with a whole week of experience so far.
By “quicktags” I’m referring to the little icons that appear above the text entry box in the Write > Post page in admin. (is that the same as the rich text editor?)
But even in Safari where the tags aren’t available, hitting return causes a regular paragraph break and hitting Shift-return causes a line break … at least in my install.
Thanks for the post. Now I wonder if the download of WordPress or as installed is corrupt.
I also get quicktags with Firefox 1.0.6, Opera 8.52, but not with Safari 1.2.4.
With all 3 installations (2 with the hacked Tiny MCE file, and one with the default file), shift-return does nothing. No changes in the code, no
<br />inserted. It just strips everything out. I can put in 50 returns, or 50 shift-returns, and it will strip them out.
I have the EXACT same problem. I have tried every single “supposed” solution to this problem, including mofifying the Tiny MCE .js file. Nothing works. I am desperate.
Have you found a solution? I’ll appreciate your help.
No solution yet.
I do understand your desperation. I’ve gone from being desperate to to use a line break to a smoldering white hot hatred of Tiny MCE.
If anyone knows anyone who knows how to code WordPress or this blasted TinyMCE please send them over here where help in removing it is needed.
After reading this and your other post I think it’s not TinyMCE that’s causing your trouble.
By default WordPress run’s the wpautop filter on every post, which (among other things) replaces multiple succesive occurances of newlines or BR tags by a single one.
You can find it in wp-include/wpautop.php.
- The topic ‘Force line break inspite of Tiny MCE editor using a Mac’ is closed to new replies.