Forums / General / Online Editor multiple line break support

Online Editor multiple line break support

Author Message

Justin Brown

Sunday 20 June 2004 11:47:50 pm

It says in the release notes for Online Editor 1.3.1 that it now supports multiple line breaks. In the accompanying doc, it says in the tips to use shift-enter to insert a line break.

I'm using eZPublish 3.4.0 and Online Editor 1.3.2, and cannot seem to get multpiple line breaks to display correctly. They seem to be removed on publishing the same as in previous versions. Any ideas?

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