• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Can't fix Pasting text from OpenOffice on Mac OS X removes blank lines

Teapot

Well-known member
#1
So, a member at our forums has reported problems pasting text from OpenOffice 4.0.0 into the Redactor editor in XenForo 1.2.2 on Mac OS X 10.6.8.

The problem is that blank lines are removed when copying to XenForo - that is, text like this:

Text text text

Text text text

Text text text
is being collapsed into:

Text text text
Text text text
Text text text
This happens when pasting into Redactor in Safari or Firefox on OS X, and does not occur when pasting into the raw editor.
 

Mike

XenForo developer
Staff member
#2
This is often down to the HTML that the program doing the copy generates. This is far from a trivial issue.

I'll need to look at this on a Mac, but on Windows, it actually generates an extra break. This is because it generates <p> tags but puts a 0cm margin-bottom of them (which isn't dissimilar from the way our own editor works). However, we treat <p>s as requiring a double break, which ends up inserting an extra one.
 

Teapot

Well-known member
#3
Ah yes, I'm aware of how much a pain trying to normalise input from all sorts of obscure sources is when trying to format them in the editor. Good luck!