How do I make Online Editor produce multiple line breaks?

Author Message

Espen R

Thursday 08 November 2007 7:12:26 am

I want to be able to use serveral line breaks in a row.

The html should be output like this:

----------
<p>
some text<br />
<br />
<br />
some more text
</p>
--------

Currently the OE strips it down to one <br />.

Please guide me in the right direction.

OE 4.2.3 - eZ 3.9.2

Mark Marsiglio

Thursday 08 November 2007 7:49:33 am

This is disabled by default because it interferes with the concept of separation of content and presentation.

You can re-enable the ability to add multiple consecutive line breaks by overriding the AllowEmpty setting in content.ini.

Put this is in the content.ini.append.php file for your user and admin siteaccesses.

[paragraph]
AllowEmpty=true

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Tony Wood

Thursday 08 November 2007 10:05:25 am

Hi Mark,

I think this rule was meant to be broken :)

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Espen R

Monday 12 November 2007 6:44:52 am

Thanks a lot Mark. I still don't think this will allow me to make several <br /> in a row. At least OE still wouldn't let me. It did however allow empty paragraphs, and if that's the only available option then I guess we'll have to live with that. :-\

Pascal France

Thursday 22 November 2007 7:42:43 pm

Hi,

I've tested the AllowEmpty=true option in content.ini.append.php (in both user and admin siteaccess) and the result is not the one we could expect:

In the preview admin interface I get this source code:

<p>Text of my paragraph</p>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p>
<br/>
</p>
<p>Pascal</p>

But in the page of the public site I get this source code:

<p>Text of my paragraph</p>
<p/>
<p/>
<p/>
<p> Pascal </p>
So there are no break line and the result is like if I hadn't turn on the AllowEmpty option.

Did I miss something else ? (I use ez 3.9.4 and OE 4.2.4)

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Espen R

Friday 23 November 2007 2:17:21 am

I guess it's correct to say that the <i>paragraphs</i> are empty. These would normally be stripped away without the AllowEmpty attribute set to true.

An empty paragraph is not the best solution in my opinion because a <br> would normally give a spacing of one line height while the paragraph would give some more, often a double line height. This results in less control for the user.

While I agree that most of the time this kind of layout manipulation should be avoided, it is sometimes a demand from the client that can't be denied them.

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

eZ debug

Timing: Jan 18 2025 14:53:47
Script start
Timing: Jan 18 2025 14:53:47
Module start 'layout'
Timing: Jan 18 2025 14:53:47
Module start 'content'
Timing: Jan 18 2025 14:53:48
Module end 'content'
Timing: Jan 18 2025 14:53:48
Script end

Main resources:

Total runtime0.7352 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 589.2969152.6563
Module start 'layout' 0.00420.0029 741.953139.4922
Module start 'content' 0.00710.7267 781.4453658.7969
Module end 'content' 0.73380.0013 1,440.242216.1094
Script end 0.7351  1,456.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3950160.0002
Check MTime0.00120.1669160.0001
Mysql Total
Database connection0.00050.068910.0005
Mysqli_queries0.672291.4382700.0096
Looping result0.00070.0954680.0000
Template Total0.704995.920.3525
Template load0.00280.381820.0014
Template processing0.702195.501220.3510
Template load and register function0.00010.017710.0001
states
state_id_array0.00100.134810.0010
state_identifier_array0.00080.104020.0004
Override
Cache load0.00230.3172430.0001
Sytem overhead
Fetch class attribute can translate value0.00070.096340.0002
Fetch class attribute name0.00130.181490.0001
XML
Image XML parsing0.00340.467840.0009
class_abstraction
Instantiating content class attribute0.00000.0032110.0000
General
dbfile0.00340.4645270.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs