Stories app

This page describes how to use the Stories app, an example of a custom content editor that authors can use to quickly create and publish flexible content in Magnolia.

Use the Stories app to create and edit stories on a Magnolia author instance. Complete the structured outline to give the story a set of key static properties. Then, build up the unstructured body of your story using content blocks you want: images, texts, videos and links. You can save and publish in one click to get your content on your website fast.

Compared to pages, stories are ideal for quickly producing free-form content without any page-hierarchy constraints. Stories, with a clear distinction between formatting and content, can then be published to different destinations: from a web page to a mobile app or as an article for an online newspaper.

Stories app is a feature available only in DX Core.


You create stories in the Stories app.

Stories app tile in App launcher

You can organize your stories by adding folders. To add a new story, click Add story.

Story browser

Demo stories

If you have the Magnolia demo modules installed, the Stories app contains some sample blogposts to show what you can do with the Stories app. Without the demo modules, the Stories app does not contain any content by default.

In the demo, the Stories app has been decorated (/travel-demo-stories-app/decorations/stories-app/apps/stories.yaml) to extend the default functionality described on this page. The customization of the Stories app mainly introduces two new blocks, date and tour.


When you create a new story, it provides the title and lead text fields as well as several collapsible multi-field sections where you can fill in some key properties.


By default, the outline consists of the following fields and collapsible sections:

  • Title* - The title of the story.

  • Lead text* - The lead text for the story.

  • Lead visual - Collapsible section where you can select the Embed, Image or Video visual option:

    • For the Embed option, you can embed HTML code and add an asset as an Alternate image.

    • For the Image option, you can select an asset from the Assets chooser dialog and add Alt text.

    • For the Video option, you can select a video asset from the Assets chooser dialog and add another asset as an Alternate image.

    • In all cases, you can add a Caption and Credits.

  • Author - Collapsible section where you can add:

    • Author name

    • Author profile image with Assets chooser.

    • Author short bio - A text field with a maximum of 300 characters.

    • Author lives in - For the location of the author.

  • Related content - Collapsible section where you can add a list of related stories.

  • Dates & URL - Collapsible section where you can add:

    • Story created on*

    • Story updated on

    • URL slug - Used as the name of the story and in the URL. If you leave this field empty, the URL slug is automatically generated from the story’s Title when you first save the story.

Mandatory fields are indicated by an asterisk.


Once you have completed the outline, you can add, reorder and delete content blocks to suit your requirements.

See the shortcuts below to work even faster.

Magnolia provides the following block types out-of-the-box:

  • Text

  • Image

  • Video

  • Content from another website

The following two are provided by the Travel Demo:

  • Date

  • Tour

To add blocks to your story, click the plus icon in your story to expand the Block chooser menu and select the block type you want.


The … Others option at the bottom of the menu opens the Block chooser dialog.

The types of block available may vary depending on what your development team has configured.

To delete a block, click the trash icon to the right of the block or use the backspace shortcut.

Text blocks

Add text blocks to write paragraphs or headings. Each paragraph or heading must be a separate text block. To enter a line break within a block, press Shift+Enter. If you press Enter while typing, a new text block is created at the cursor position.

You can format the text and insert or remove links to external content or to Magnolia items using the formatting bar displayed when you are editing a text block.


If you apply a header style to text in a block, the entire block becomes a heading.

If you paste text from another source into a text block, all formatting is removed. If you paste several paragraphs at the same time, multiple corresponding blocks are created.

When you are typing in a text block, press Enter to add a new text box.

If you insert links in a text block:

  • Use the image external link icon to link to external URLs or emails.

  • Use the image internal link icon to link to content in another Magnolia app. By default, you can link to content in the Assets and Pages apps from the Stories app.

The list of apps with content you can link to may vary depending on what your development team has configured.

Image blocks and video blocks

Add image or video blocks to select an existing asset or upload a new one.

Click browse to open the Assets chooser dialog and select an asset for your story or upload a new one. You can also add image-related or video-related metadata.

Blocks for content from another website

Use the Embedded content block to embed content from another external website. This block type uses link unfurling: it scans the URL you enter for metadata and provides a preview in the story. For example, this YouTube link displays a thumbnail preview, title and lead text:

Embedded content block

The preview displayed for external links depends on the metadata the site owner embedded in their web page header.

Publishing stories

When you have finished writing your story, you can directly click Save and publish at the bottom of the story. Alternatively, you can select a story in the workbench and click Publish. The publication process and statuses are explained here.

You must publish any assets you use in your stories separately.

The Stories app does not provide any default page or component templates to render the stories. The templates to render the stories must be configured by your development team.

You can see an example of published stories in the Magnolia demo.


The Stories app supports a few keyboard shortcuts to speed up content editing.

Selecting blocks and entering the edit mode

Use the Tab key to select the next block and, after pressing the key again, to enter the edit mode in the selected block.

The Esc key functions as a toggle key for block select and block edit modes.

Moving blocks

When a block is selected, you can use Alt-J and Alt-K to move the block.

Editing in text blocks

Action Shortcut

Create new text block at the position of the cursor in a non-empty text block.


Delete the current block and merge the text to the right of the cursor with the text in the preceding block.


Content internationalization (i18n)

Internationalization (i18n) of content is not supported in the 1.3.x and 2.0.x versions of the Content Editor module and its Stories app submodule.

The feature will only be enabled in version 2.1. Until it is released for production-ready use, you cen test it out in version 2.1-beta. This version is available on Magnolia Nexus under the following coordinates:


Before adding this beta into your webapp, you must remove the bundled version of the module.

Compatibility of content and block definitions

Flat vs nested content structure

The data model for the internationalized Content Editor stories is different in the beta version. Whereas in 1.3.x and 2.0.x the mgnl:block elements are stored in a flat node structure,

└── story1
    ├── 0
    └── 1

in the i18n-supported version, the nodes are locale-nested under intermediate nodes of type mgnl:contentNode, named custom_de and custom in this example:

└── story1
    └── custom_de
    │   ├── 0_de
    │   └── 1_de
    └── custom
        ├── 0
        └── 1

This must be reflected in your MultiJcrBlockDefinition, where you need to add and enable the i18n property.

Instead of the CurrentItemProvider, the CompatibleBlockProvider is set as the default provider, which can resolve both flat and nested block nodes. You do not need to declare it in your block definition.

Example definition
  label: Blocks
  $type: multiJcrBlock
  i18n: true
    - text
This applies only to the 2.0.x block definitions. Block definitions created for version 1.3.x (5 UI) of the module are not compatible with the 2.1-beta version and must be fully migrated.

Migrating content to 2.1-beta

There are two ways you can migrate the non-i18n blocks to the i18n-compatible hierarchy: using a version handler or a Groovy script.

Version handler

When upgrading the Stories app submodule to version 2.1-beta (or 2.1 once available), all block nodes in the stories workspace will be moved to intermediate nodes, see the MigrateBlockToIntermediateParentTask task.

Groovy script

You can run the migration task in the Groovy app, especially in case a block node is stored in another workspace.

Example Groovy script
import info.magnolia.editor.setup.MigrateBlockToIntermediateParentTask
import info.magnolia.module.InstallContextImpl
import info.magnolia.module.ModuleRegistryImpl
import info.magnolia.objectfactory.Components
import javax.jcr.Session

Session session =  MgnlContext.getJCRSession("stories");
task = new MigrateBlockToIntermediateParentTask("stories", "/", "custom");

The parameters in the MigrateBlockToIntermediateParentTask:

Editing and publishing aspects
Locale selector is disabled

The locale selector combo box is disabled in the following cases:

  • The multiJcrBlock field is configured with i18n: true but the story structure has not been migrated yet.

  • The story complies with the new i18n structure but the multiJcrBlock field is configured with i18n: false.

Publishing stories with multilanguage content

When you publish a story where multilanguage content is enabled and present, the whole story node is published, that is all language variants of the blocks in the story are always published.

Related topics