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

Rich text in apps

Show article bodies (ezxmltext rich text) in an app - why the REST value is plain text, the three options (plain text, rendered XHTML in a web view, a structured export from a server endpoint), links and embedded images…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/content-modeling/rich-text-in-apps.md

On this page

Rich text in apps

This page is for app developers who show articles, news or any content with formatted body text. Rich text fields (the datatype ezxmltext) are the part of the content model that needs a decision before you build.

Contents

  1. What the REST value is
  2. Three options
  3. Links and embedded content
  4. Choosing

What the REST value is

For an ezxmltext field, the REST answer's value is the field's rendered HTML with every tag removed (strip_tags() in ezpRestContentModel::attributeOutputData()). Paragraph breaks, headings, lists, bold text, links and embedded images are gone. That is fine for a teaser line and not enough for an article body.

Three options

OptionHowGivesCosts
Plain textthe REST field valuetext onlynothing; loses all formatting
Rendered XHTML?OutputFormat=xhtml on a node read, with rest templates on the serverrenderedOutput, HTML of the whole nodethe site team maintains two templates; the app needs a web view (Rendered XHTML output)
A structured exporta server endpoint written for the app that turns the field into a list of blocks (paragraph, heading, image, link)native rendering, full controlPHP work on the server (ezjscore server functions for your app)

The remote services also export attribute values (expnode::dataMap, expnode::attribute); check what they give for your rich text fields on a test installation before you choose them for article bodies.

Rich text can link to other content and embed images and objects. In rendered HTML, those links point to addresses of the site. An app that wants to open them natively resolves the path to a node (Node ids, remote ids and deep links); "map them to your front end's routes by URL alias or node ID" is the advice of Headless Exponential. Embedded images in rendered HTML use the image aliases of the site's templates.

Choosing

  • Teasers and short texts: plain text, and ask for a dedicated plain teaser field (Content classes for apps).
  • A news or magazine app with long articles: rendered XHTML is the quickest route if the site team can own the rest templates; a structured export if the app must render natively (accessibility settings, dark mode, fonts).
  • Writing rich text from the app: REST create passes rich text through the online editor's input parser, so simple HTML such as <p>Text</p> is accepted (Creating and removing content).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

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