Page History
...
Excerpts from: https://git.magnolia-cms.com/projects/DEMOS/repos/minimal-headless-spa-demos/.
Info |
---|
To create |
...
a mapping, the important thing is the Magnolia |
...
and the template path. |
For this the following template definition, the Magnolia template id is spa-lm:components/headline
Code Block | ||||
---|---|---|---|---|
| ||||
title: Headline dialog: spa-lm:components/headline |
...
Additionally, to set the mappings, setComponentMapping()
must be called on the EditorContextService
:
Code Block | ||||
---|---|---|---|---|
| ||||
this.editorContext.setComponentMapping(config.componentMapping); |
...
Additionally, to set the mappings, the config
object must be passed through the config
argument of the<EditablePage/>
component>
component:
Code Block | ||||
---|---|---|---|---|
| ||||
import config from '../magnolia.config'; ... <EditablePage templateDefinitions={templateDefinitions} content={content} config={config}> |