在富文本编辑器中使用自定义样式的选项似乎是:
removed in Touch UI, as per the AEM 6.0 documentation
.
触摸优化UI不支持以下插件/功能组合:
谢天谢地
他们回到了AEM 6.2
.我不确定6.1版本,它们可能也得到支持。
AEM 6.2的文档
describes the steps necessary to enable the
Styles
RTE Plugin
.我花了很多时间阅读,但我还是设法得到了
风格
插件正在工作。
以
TL;博士
我只能说,样式配置遵循与经典UI相同的格式,您还需要注意
uiSettings
对于您的组件,因为它们驱动触摸UI中按钮的可见性。
下面是一个示例字段配置(其余部分
cq:dialog
为简洁起见省略:
<text jcr:primaryType="nt:unstructured"
name="./text"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
useFixedInlineToolbar="true">
<rtePlugins jcr:primaryType="nt:unstructured">
<format jcr:primaryType="nt:unstructured" features="*"/>
<justify jcr:primaryType="nt:unstructured" features="*"/>
<lists jcr:primaryType="nt:unstructured" features="*"/>
<links jcr:primaryType="nt:unstructured" features="*"/>
<styles jcr:primaryType="nt:unstructured" features="styles">
<styles jcr:primaryType="cq:WidgetCollection">
<warning jcr:primaryType="nt:unstructured" cssName="warning" text="Warning"/>
<note jcr:primaryType="nt:unstructured" cssName="note" text="Note"/>
<header jcr:primaryType="nt:unstructured" cssName="header" text="Header"/>
</styles>
</styles>
<paraformat jcr:primaryType="nt:unstructured" features="*">
<formats jcr:primaryType="cq:WidgetCollection">
<paragraph jcr:primaryType="nt:unstructured" description="Paragraph" tag="p"/>
<heading1 jcr:primaryType="nt:unstructured" description="Heading 1" tag="h1"/>
</formats>
</paraformat>
</rtePlugins>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline jcr:primaryType="nt:unstructured">
<popovers jcr:primaryType="nt:unstructured">
<justify jcr:primaryType="nt:unstructured" ref="justify"/>
<lists jcr:primaryType="nt:unstructured" ref="lists"/>
<paraformat jcr:primaryType="nt:unstructured" items="paraformat:getFormats:paraformat-pulldown" ref="paraformat"/>
<styles jcr:primaryType="nt:unstructured" items="styles:getStyles:styles-pulldown" ref="styles"/>
</popovers>
</inline>
</cui>
</uiSettings>
</text>
注意中的元素
text/rtePlugins/styles
和
text/uiSettings/cui/inline/popovers/styles
.
下面是它在页面上的外观: