By applying the mn:editable
tag to a block of text, it can be made editable by the user.
<div mn:editable>Sed aliquam auctor congue. Fusce varius, leo vitae pulvinar varius, diam mauris faucibus velit... </div>
In the communication designer, the text will appear surrounded by dashes and associated with the object edit icon.
The user can edit it by clicking and opening the edit editor.
The editor works in two modes:
-
Inline:
the text is editable directly in the body of the communication, allowing adding links and placeholders; -
Advanced:
all inline mode modifications can be made, and in addition, it will be possible to apply advanced formatting, such as - for example - inserting tables or images and directly editing the HTML code of the object.
You can customize the label displayed to the user in the edit popup by inserting the tag
mn:label="Label"
.By default, content can be edited using the platform's HTML editor.
You can still specify this option by using mn:type="html"
.
If, on the contrary, you want to limit editing to text only, simply insert mn:type="text"
.
To retain the contents of editable parts when changing the communication template, it is recommended to always assign them an ID.
Use
Use
mn:id="nameid"
to assign an ID to each element inserted in your code.<div mn:editable mn:id="content1">Editable text</div>