Forums / Setup & design / Changing behavior of XML text field and/or Online Editor?

Changing behavior of XML text field and/or Online Editor?

Author Message

Luis Cruz

Wednesday 29 March 2006 1:15:00 pm

Greetings; my content editors know very little HTML, so the XML text field and the Online Editor have been the almost perfect solution. The editors can understand how to use the various buttons to bold items, add links, add images via objects, etc. However, the solution fails on the design level.

The issue is that either the Online Editor, the processing of the XML text field, or both places paragraph tags in places and/or line breaks in places where none are desired, e.g., a link in the middle of a sentence is suddenly wrapped in a paragraph tag. Plus, there seems to be no fine control over how text is separated (paragraph vs. line break). Especially annoying is the XML text field wrapping everything in a paragraph tag even if it is a single sentence that should not be placed in a paragraph.

I have found a thread (http://ez.no/community/forum/suggestions/default_paragraph_in_an_ezxmltext_datatype) that shows me where in the kernel code I can remove the automatic wrapping of the XML field with a paragraph tag. However, I do not know how the other issues can be changed.

I am currently using OE 3.1.1 and am awaiting my order to go through so I can upgrade. If the answer is "upgrading OE", that is great. But I am skeptical that is the answer and hope someone in here can help.

Thanks.

Kirill Subbotin

Monday 03 April 2006 5:08:48 am

The problem is that current inner eZXML format is quite different from XHTML 1 and current output implementation doesn't work well in some cases. But we are going to improve this for future versions, and also probably some of your issues can be solved even now in some way.

Please give me examples of you input and output and point what exactly is wrong in your opinion. (Input can be either "simplified xml" that is shown when OE is disabled or inner eZXML from the database) I think we will find some solution.

Luis Cruz

Wednesday 05 April 2006 2:25:53 pm

Greetings, Kirill; I have poked around in the kernel a bit and understand better why ezp is doing what it is doing. I'll have to dig a bit more for some concrete examples, but here is one specific annoyance I can outline.

For example, I go to edit a folder and enter in the sentence "Hello world; I'm a folder" into the short description. I add no formatting to the sentence; if I disable the OE, no tags appear around the sentence.

When I publish the folder and view it, ez has wrapped the short description with paragraph tags. After poking around in the kernel, I realized the blindingly obivious (finally); the field is an XML field which means its content has to be well-formed XML. However, I feel that wrapping a bare, unformatted sentence in a paragraph tag is not necessarily the best solution.

I can see wrapping it in paragraph tags if there is some form of line break in the field's content. But a single, unbroken piece of content I would prefer to see wrapped in something generic that does not impart any formatting/style to it.

In the short term, I basically have created an override template for p.tpl and pass in a variable that tells the template to not output the actual paragraph tag.

If I find some other examples, I'll post them here; for now, thank you for taking the time to read through this.

Cheers.

eZ debug

Timing: Jan 21 2025 21:09:31
Script start
Timing: Jan 21 2025 21:09:31
Module start 'content'
Timing: Jan 21 2025 21:09:31
Module end 'content'
Timing: Jan 21 2025 21:09:31
Script end

Main resources:

Total runtime0.2058 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.9688180.7969
Module start 'content' 0.00580.0068 768.765693.7734
Module end 'content' 0.01260.1931 862.5391523.1719
Script end 0.2057  1,385.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.6013200.0002
Check MTime0.00140.6683200.0001
Mysql Total
Database connection0.00070.328010.0007
Mysqli_queries0.156876.21101410.0011
Looping result0.00120.60201390.0000
Template Total0.192793.610.1927
Template load0.00090.423710.0009
Template processing0.191893.209810.1918
Override
Cache load0.00060.304210.0006
Sytem overhead
Fetch class attribute can translate value0.00100.476610.0010
XML
Image XML parsing0.00020.115210.0002
General
dbfile0.00914.4393200.0005
String conversion0.00000.003030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs