问题描述
我有一个包含多个RTF文本字段的Touch UI对话框。有些分布在几个选项卡上。我想将多个插件(例如misctools插件)添加到RTE工具栏。如何完成?
I have a Touch UI dialog containing multiple Rich Text fields. Some are spread out over several tabs. I would like to add several plugins, such as the misctools plugin, to the RTE toolbar. How is this accomplished?
我尝试使用rtePlugins节点作为对话框中字段节点的子节点来配置它们,并尝试在该节点下添加rtePlugins节点。 cq:editConfig-> cq:inplaceEditing节点,但是这些方法都不能更改对话框本身内部的RTE工具栏(我不想就地编辑)。
I have tried configuring them using the an rtePlugins node as a child of the field node in the dialog, as well as adding an rtePlugins node under the cq:editConfig->cq:inplaceEditing node, but none of these approaches change the RTE toolbar inside the dialog itself (I don't want in-place editing).
我甚至想做些什么?
推荐答案
更新我以前的答案:
对此很有帮助 #RTE-就地和在对话框中
HAVE A LOOK AT THIS https://docs.adobe.com/docs/en/aem/6-3/administer/operations/page-authoring/rich-text-editor.html #RTE - In-place and In a Dialog
在对话框内部看起来RTE实际上是可能的,但确实存在问题,如上面的链接所述。此外,6.3现在使用CoralUI2,因此上面的解决方案确实有效,但是useFixedInlineToolbar = {Boolean} true的设置在对话框内没有影响,除非在RTE文本区域内单击,否则RTE菜单不可见。我还没有解决这个问题。
It would appear RTE inside a dialog is actually possible, but it does have it's issues, as documented in the link above. Additionally, 6.3 now uses CoralUI2, so this solution above does work, but the setting of useFixedInlineToolbar="{Boolean}true" has no affect inside a dialog, the RTE menu is not visible until you click inside the RTE textarea. I'm yet to resolve this.
这是我刚刚在AEM6.3的touchUI对话框中为RTE创建的一个例子。
Here's an example I've just created for RTE inside a touchUI dialog in AEM6.3
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Properties"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<regulartext
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Text"
name="./regulartext"/>
<text jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
fieldLabel="RICH As Text"
name="./text"
useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured">
<edit
jcr:primaryType="nt:unstructured"
defaultPasteMode="wordhtml"
features="[cut,copy,paste-plaintext,paste-wordhtml]"
stripHtmlTags="{Boolean}true"/>
<findreplace
jcr:primaryType="nt:unstructured"
features="*"/>
<format
jcr:primaryType="nt:unstructured"
features="*"/>
<image
jcr:primaryType="nt:unstructured"
features="*"/>
<justify
jcr:primaryType="nt:unstructured"
features="*"/>
<links jcr:primaryType="nt:unstructured">
<linkDialogConfig
jcr:primaryType="nt:unstructured"
height="{Long}316">
<linkAttributes jcr:primaryType="cq:WidgetCollection">
<linkAdvanced
jcr:primaryType="cq:Widget"
collapsed="{Boolean}true"
collapsible="{Boolean}true"
inputValue="advanced"
name="./linkdialog/cq:adhocLinkTrackingTab"
title="Link tracking"
xtype="dialogfieldset">
<items jcr:primaryType="cq:WidgetCollection">
<enable
jcr:primaryType="nt:unstructured"
attribute="enabletracking"
fieldDescription="override analytics framework settings"
fieldLabel="Custom link tracking"
name="./linkdialog/cq:adhocLinkTrackingEnableTracking"
xtype="checkbox">
<listeners
jcr:primaryType="nt:unstructured"
check="function(component){var dlg=component.findParentByType('rtelinkdialog');dlg.enableSCFields(component.checked);}"/>
</enable>
<events
jcr:primaryType="nt:unstructured"
attribute="adhocevents"
fieldDescription="e.g.: event2, event7"
fieldLabel="Include SiteCatalyst events"
name="./linkdialog/cq:adhocLinkTrackingEvents"
xtype="textfield"/>
<evars
jcr:primaryType="nt:unstructured"
attribute="adhocevars"
fieldDescription="e.g.: eVar1: pagedata.url, prop4: 'const'"
fieldLabel="Include SiteCatalyst variables"
name="./linkdialog/cq:adhocLinkTrackingEvars"
xtype="textfield"/>
</items>
</linkAdvanced>
</linkAttributes>
</linkDialogConfig>
</links>
<lists
jcr:primaryType="nt:unstructured"
features="*"/>
<misctools
jcr:primaryType="nt:unstructured"
features="*">
<specialCharsConfig jcr:primaryType="nt:unstructured">
<chars jcr:primaryType="nt:unstructured">
<copyright
jcr:primaryType="nt:unstructured"
entity="©"/>
<trademark
jcr:primaryType="nt:unstructured"
entity="™"/>
<registered
jcr:primaryType="nt:unstructured"
entity="®"/>
<emDash
jcr:primaryType="nt:unstructured"
entity="—"/>
<dagger
jcr:primaryType="nt:unstructured"
entity="†"/>
<doubleDagger
jcr:primaryType="nt:unstructured"
entity="‡"/>
</chars>
</specialCharsConfig>
</misctools>
<paraformat
jcr:primaryType="nt:unstructured"
features="*">
<formats jcr:primaryType="cq:WidgetCollection">
<p
jcr:primaryType="nt:unstructured"
description="Paragraph"
tag="p"/>
<h1
jcr:primaryType="nt:unstructured"
description="Heading 1"
tag="h1"/>
<h2
jcr:primaryType="nt:unstructured"
description="Heading 2"
tag="h2"/>
<h3
jcr:primaryType="nt:unstructured"
description="Heading 3"
tag="h3"/>
<h4
jcr:primaryType="nt:unstructured"
description="Heading 4"
tag="h4"/>
<h5
jcr:primaryType="nt:unstructured"
description="Heading 5"
tag="h5"/>
<h6
jcr:primaryType="nt:unstructured"
description="Heading 6"
tag="h6"/>
</formats>
</paraformat>
<spellcheck
jcr:primaryType="nt:unstructured"
features="*"
invalidStyle="background-color: #ffdddd;"/>
<styles
jcr:primaryType="nt:unstructured"
features="*">
<styles jcr:primaryType="cq:WidgetCollection">
<disclaimer
jcr:primaryType="nt:unstructured"
cssName="small"
text="Disclaimer"/>
</styles>
</styles>
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
<table
jcr:primaryType="nt:unstructured"
features="*"/>
<undo
jcr:primaryType="nt:unstructured"
features="*"/>
</rtePlugins>
<htmlRules jcr:primaryType="nt:unstructured">
<docType jcr:primaryType="nt:unstructured">
<typeConfig
jcr:primaryType="nt:unstructured"
useSemanticMarkup="{Boolean}true"/>
</docType>
</htmlRules>
<uiSettings jcr:primaryType="nt:unstructured">
<cui jcr:primaryType="nt:unstructured">
<inline
jcr:primaryType="nt:unstructured"
toolbar="[#format,-,#justify,-,#lists,-,links#modifylink,links#unlink,links#anchor,-,#styles,#paraformat,-,subsuperscript#subscript,subsuperscript#superscript,-,edit#cut,edit#copy,edit#paste-plaintext,edit#paste-wordhtml,-,findreplace#find,findreplace#replace,-,undo#undo,undo#redo,-,spellcheck#checktext,-,misctools#specialchars,-,#styles,#paraformat,-,table#table]">
<popovers jcr:primaryType="nt:unstructured">
<format
jcr:primaryType="nt:unstructured"
items="[format#bold,format#italic,format#underline]"
ref="format"/>
<justify
jcr:primaryType="nt:unstructured"
items="[justify#justifyleft,justify#justifycenter,justify#justifyright]"
ref="justify"/>
<lists
jcr:primaryType="nt:unstructured"
items="[lists#unordered,lists#ordered,lists#outdent,lists#indent]"
ref="lists"/>
<styles
jcr:primaryType="nt:unstructured"
items="styles:getStyles:styles-pulldown"
ref="styles"/>
<paraformat
jcr:primaryType="nt:unstructured"
items="paraformat:getFormats:paraformat-pulldown"
ref="paraformat"/>
</popovers>
</inline>
<!--<fullscreen-->
<!--jcr:primaryType="nt:unstructured"-->
<!--toolbar="[#format,-,subsuperscript#subscript,subsuperscript#superscript,-,edit#cut,edit#copy,edit#paste-plaintext,edit#paste-wordhtml,-,findreplace#find,findreplace#replace,-,undo#undo,undo#redo,-#justify,-,links#modifylink,links#unlink,links#anchor,-,#lists,-,spellcheck#checktext,-,misctools#specialchars,-,#styles,#paraformat,-,table#table,-,fullscreen#finish,-,control#close,control#save]">-->
<!--<popovers jcr:primaryType="nt:unstructured">-->
<!--<format-->
<!--jcr:primaryType="nt:unstructured"-->
<!--items="[format#bold,format#italic,format#underline]"-->
<!--ref="format"/>-->
<!--<justify-->
<!--jcr:primaryType="nt:unstructured"-->
<!--items="[justify#justifyleft,justify#justifycenter,justify#justifyright]"-->
<!--ref="justify"/>-->
<!--<lists-->
<!--jcr:primaryType="nt:unstructured"-->
<!--items="[lists#unordered,lists#ordered,lists#outdent,lists#indent]"-->
<!--ref="lists"/>-->
<!--<styles-->
<!--jcr:primaryType="nt:unstructured"-->
<!--items="styles:getStyles:styles-pulldown"-->
<!--ref="styles"/>-->
<!--<paraformat-->
<!--jcr:primaryType="nt:unstructured"-->
<!--items="paraformat:getFormats:paraformat-pulldown"-->
<!--ref="paraformat"/>-->
<!--</popovers>-->
<!--</fullscreen>-->
<tableEditOptions
jcr:primaryType="nt:unstructured"
toolbar="[table#insertcolumn-before,table#insertcolumn-after,table#removecolumn,-,table#insertrow-before,table#insertrow-after,table#removerow,-,table#mergecells-right,table#mergecells-down,table#mergecells,table#splitcell-horizontal,table#splitcell-vertical,-,table#selectrow,table#selectcolumn,-,table#ensureparagraph,-,table#modifytableandcell,table#removetable,-,undo#undo,undo#redo,-,table#exitTableEditing,-]"/>
</cui>
</uiSettings>
</text>
</items>
</column>
</items>
</content>
</jcr:root>
这篇关于AEM 6.1-在触摸UI对话框内的RTE字段上配置富文本编辑器插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!