Forums / General / How do I make Online Editor produce multiple line breaks?

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.

eZ debug

Timing: Jan 18 2025 10:29:57
Script start
Timing: Jan 18 2025 10:29:57
Module start 'content'
Timing: Jan 18 2025 10:29:58
Module end 'content'
Timing: Jan 18 2025 10:29:58
Script end

Main resources:

Total runtime0.8086 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.0781180.8047
Module start 'content' 0.00580.6538 769.8828663.9063
Module end 'content' 0.65960.1490 1,433.7891341.0469
Script end 0.8085  1,774.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5213210.0002
Check MTime0.00150.1895210.0001
Mysql Total
Database connection0.00070.091310.0007
Mysqli_queries0.724289.55902070.0035
Looping result0.00220.26712050.0000
Template Total0.781596.620.3907
Template load0.00200.245620.0010
Template processing0.779596.396420.3897
Template load and register function0.00020.020210.0002
states
state_id_array0.00080.093110.0008
state_identifier_array0.00070.085020.0003
Override
Cache load0.00170.2109430.0000
Sytem overhead
Fetch class attribute can translate value0.00170.206850.0003
Fetch class attribute name0.00120.146190.0001
XML
Image XML parsing0.00200.248750.0004
class_abstraction
Instantiating content class attribute0.00000.0025110.0000
General
dbfile0.00450.5532380.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs