Online Editor multiple line break support

Online Editor multiple line break support

Sunday 20 June 2004 11:47:50 pm - 5 replies

Author Message

Brendan Pike

Wednesday 23 June 2004 10:02:00 pm

I also am experiencing the same problem does anyone have a solution?

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Wenyue Yu

Friday 25 June 2004 5:26:50 am

Hi,

If you comment line 367 in ezdhtml/ezxmltext/handlers/input/ezdhtmlxmlinput.php like following:

// $domString = preg_replace( "#<paragraph>&nbsp;</paragraph>#", "<paragraph />", $domString );

and uncomment line 370 in the same file:

$domString = preg_replace( "#<paragraph>&nbsp;</paragraph>#", "<paragraph />", $domString );

then you should get multiple empty paragraphs ( use enter not shift-enter since it will only create one single line break)

Best regards,
wenyue

Justin Brown

Tuesday 29 June 2004 12:55:49 am

Thanks wenyue, much appreciated :)

Brendan Pike

Tuesday 28 September 2004 11:34:02 pm

I never was succesful in getting this to work, after making Wenyue's suggested changes Online Editor then holds the line break information okay, but it seems that the parser still strips out the multiple breaks before presenting the article.

Also Wenyue when your suggestion is implemented it also has the side effect of leaving a <p> tag in a content area (body) for example if the user has typed there but then deleted. This has the effect that articles will sense body content and link to full view even though there is none. The body area is then impossible to clear unless you disable the editor.

Any further advice on getting return breaks anyone?

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Wenyue Yu

Thursday 14 October 2004 4:34:56 am

>but it seems that the parser still strips out the multiple breaks before presenting the article.
I guess the reason is that browsers will not display <p></p> which eZ publish xmloutputhandle returns for breaks. I have fixed this bug in svn 8689. You can change line 257 in kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmloutput.php to <p> </p> which will solve the problem.

> it also has the side effect of leaving a <p> tag in a content area (body) for example if the user has typed > there but then deleted. This has the effect that articles will sense body content and link to full view even >though there is none. The body area is then impossible to clear unless you disable the editor.

Yes, there is the problem, this side-effect will be removed in the next release.

Regards,
wenyue

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.