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.

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