Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Rich text tags

The XML tags of the rich text datatype (headings, lists, emphasis, literal, links, anchors, tables, embedded objects, custom tags), the class parameter, and how the online editor and templates relate to them.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/book-learning/rich-text-tags.md

On this page

Rich text tags

The ezxmltext datatype stores structured blocks of text as XML. Editors rarely see the XML, because the online editor writes it, but a builder needs the vocabulary: it is what templates turn into HTML, and what an import or a script writes. The tags that the kernel accepts are listed in kernel/classes/datatypes/ezxmltext/ezxmlschema.php; the set is the one the book describes.

Every tag can take a class parameter. It is normally used in the tag's template to put a CSS class on the HTML, but the template may do more with it (the book's example: a header of class chapter rendered differently).

The tags

TagUse
sectionThe container of the whole text; sections can nest.
headerA heading. Parameters level (1 to 6) and class.
paragraphA paragraph.
ul, ol, liUnordered and ordered lists.
strongBold.
emphasizeEmphasis, usually italic.
literalUnformatted text: source code, HTML or XML shown as written, rendered without being interpreted.
linkA hyperlink. Takes href (or the ID of a stored link), target, and more.
anchorA named place in the text that a link can point to. Takes name.
table, tr, th, tdA table. Parameters such as border and width on the table; width, colspan, rowspan on cells.
embed, embed-inlineAn object of the site (an image, a file, an article) placed in the text, as a block or inside a line. Parameters: object_id or node_id, view, align, class.
customA tag you define yourself by name. Needs a template.
lineA line inside a heading.

The book also lists alternative spellings (b, bold, i, em, p, a, h and others); the input parser accepts the familiar HTML names and stores the tags in the table above. The book's object tag is today's embed.

Every hyperlink in an XML text is kept in a link table of its own, with the address. That is what makes the link check possible (Links, URL aliases and wildcards): the same address in many texts is one row, and a change of the address can be made in one place. A link to an object of the site is stored by object or node ID, so it survives a rename or a move.

Embedded objects

An embedded object shows another object inside the text, using the view you name (embed for a block, or embed-inline for inline). The template for that view and class decides what appears: an image in a size, a file as a download link. See Embedding another object.

Custom tags

Custom tags carry a name (<custom name="quote">), and each has a template under design/<design>/templates/content/datatype/view/ezxmltags/ (for example a "quote" or "factbox" tag). Their names are listed in content.ini ([CustomTagSettings] AvailableCustomTags[]) and made available to editors in the online editor (Content model and editing).

In the editor

An editor does not type tags. The online editor offers formatting buttons that write the right tags, and the administration can show the result. To see the XML itself, a developer reads $attribute.content.xml_data; see Attribute access.

Next: creating and editing objects.

Source and license

Adapted from chapter 2, "Content Management with eZ publish", of Learning eZ publish: Building Content Management Solutions by Paul Borgermans, Tony Wood, Paul Forsyth, Martin Bauer, Björn Dieding and Ben Pirt (additional material by Bruce Morrison), second edition, 2024, Book-Learning-eZPublish. Copyright (c) 2004-2024 7x and Graham Brookins. Licensed under the GNU Free Documentation License, version 1.3 or any later version, with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts (the license). Changes: rearranged and shortened; settings, labels, datatypes, tags and URLs checked against Exponential 6 and corrected; links to the current guides added.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x