Setting supported markups | HCL Digital Experience
You can set supported markups on modifiable instances that implement the ModifiableMarkupCapable interface.
About this task
For example, these can be the following:
ModifiableContentPage
ModifiableContentLabel
ModifiableContentURL
Note: For content nodes, that is content pages, content labels,
and content URLs, you need to set a supported markup. Otherwise they
will not show in the read-only model.
To set the supported markups
for a resource, proceed as follows:Procedure
- Obtain a modifiable instance of the resource for which you want to set supported markups.
-
Use the appropriate methods of the
ModifiableMarkupCapable
interface to set supported markups.For example, if you want to set a markup, use theaddMarkup
method.
Example
// obtain markup list
final MarkupList markupList = ...;
// obtain modifiable instance of a layout control
final Modifiable modifiable = lmController.getModifiableNode(control);
// obtain markup object
Markup markup = markupList.getByName("html");
// set markup
((ModifiableMarkupCapable) modifiable).addMarkup(markup);