CQ 富文本字段编辑器支持粗体、斜体和下划线样式,以及仅项目符号和编号列表

sef*_*osu 1 adobe dialog richtext aem

我有一个富文本字段编辑器小部件,我需要的是激活功能(粗体、斜体和下划线样式,以及仅项目符号和编号列表。)

这是我的小部件的 xml:

<richtextfield
     jcr:primaryType="cq:Widget"
     fieldLabel="this is rich text field"
     name="./richtextfield"
     xtype="richtext">
     <rtePlugins jcr:primaryType="nt:unstructured">
           <subsuperscript
           jcr:primaryType="nt:unstructured"
           features="*"/>
     </rtePlugins>
 </richtextfield>
Run Code Online (Sandbox Code Playgroud)

正如你所看到的,我在这里启用了所有功能,,,但这不是我需要的,因为我只需要粗体、斜体和下划线样式,以及仅启用的项目符号和编号列表。

有什么建议么?谢谢

Tho*_*mas 5

您需要为特性类别添加节点,并启用或禁用该类别的特性。查看文档: http://dev.day.com/docs/en/cq/current/administering/configuring_rich_text_editor.html

这是我正在使用的相当有限的 RTE 的示例:

<text
    jcr:primaryType="cq:Widget"
    externalStyleSheets="[/etc/designs/rtg/clientlibs/author/style/source/rte.css]"
    hideLabel="{Boolean}true"
    name="./text"
    xtype="richtext">
    <rtePlugins jcr:primaryType="nt:unstructured">
        <format
            jcr:primaryType="nt:unstructured"
            features="[bold,italic]"/>
        <justify
            jcr:primaryType="nt:unstructured"
            features=""/>
        <lists
            jcr:primaryType="nt:unstructured"
            features="[ordered,unordered]"/>
        <styles
            jcr:primaryType="nt:unstructured"
            features="*">
            <styles jcr:primaryType="cq:WidgetCollection">
                <f125
                    jcr:primaryType="nt:unstructured"
                    cssName="f125"
                    text="Font Size 125% (15px)"/>
                <f150
                    jcr:primaryType="nt:unstructured"
                    cssName="f150"
                    text="Font Size 150% (18px)"/>
            </styles>
        </styles>
    </rtePlugins>
</text>
Run Code Online (Sandbox Code Playgroud)