views:

217

answers:

1

I'm currently using TinyMCE 3.3 on a drupal site, with an annoying problem.

Using both "paste from word"-button or "Force cleanup on paste" in Firefox cause TinyMCE to insert line-breaks in my paragraphs where the line would have ended in Word. In IE, I do not have this problem.

When viewing the source code in the editor, it doesn't show a
-tag, but an actual line-break. When viewing the normal text in the editor, I see no linebreak at all, but on saving, it's really there when viewing the page. Even in the beginning of every first line of every paragraph it insert a linebreak.

How do I solve this??

"Remove linebreaks" isn't an option, since people want to insert linebreaks to create some vertical spacing.

+1  A: 

Are you sure it's TinyMCE inserting line breaks and not a Drupal formatting filter? It's common for filters to add BR tags whenever there is a new line in the content - for plain text that makes it preserve the layout when rendered as HTML, but with HTML it just creates a lot of unwanted BR tags.

TinyMCE uses the same filtering and serialising functions to get the HTML to show in it's code view as it does when it submits the content, so what you see in HTML is almost always what will actually get submitted back to the server.

Regards,

Adrian Sutton
http://tinymce.ephox.com

ajsutton
Thanks for your reply, I had already solved this and as you guessed, it was the drupal linebreak converter that was really causing the problem :)
Rakward