2015-06-30 44 views

回答

1

你會作出CQ這個組件:對話框,觸摸界面和對話的經典UI 還有另外一個節點CQ:editConfig 創建一個節點下它命名爲CQ:具有以下屬性inplaceEditing: configPath- String- ../../dialog/items/items/tab1/items/richTextItem(這是經典UI RTI的路徑)

0

正如Shine提到的,該過程似乎是在對話框中爲ClassicUI啓用插件。 xml,並添加configPath到_cq_editConfig

<?xml version="1.0" encoding="UTF-8"?> 
<jcr:root 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" xmlns:xi="http://www.w3.org/2001/XInclude" 
jcr:primaryType="cq:Dialog" 
helpPath="en/cq/current/wcm/default_components.html#Text" 
title="Text" xtype="tabpanel" 
height="{Long}450" 
width="{Long}700"> 
<!-- <tabpabel jcr:primaryType="cq:Widget" xtype="tabpanel"> --> 
<items jcr:primaryType="cq:WidgetCollection"> 
    <tab1 jcr:primaryType="cq:Widget" anchor="100%" title="Text" xtype="panel"> 
     <items jcr:primaryType="cq:WidgetCollection"> 
      <text jcr:primaryType="cq:Widget" 
       hideLabel="{Boolean}true" 
       name="./text" 
       xtype="richtext"> 
       <rtePlugins jcr:primaryType="nt:unstructured"> 
       <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> 
       <edit jcr:primaryType="nt:unstructured" features="*" defaultPasteMode="plaintext"/> 
       <spellcheck jcr:primaryType="nt:unstructured" features="*" /> 
       <image jcr:primaryType="nt:unstructured" features="*" /> 
       <paraformat jcr:primaryType="nt:unstructured" features="*"> 
        <formats jcr:primaryType="cq:WidgetCollection">     
         <p jcr:primaryType="nt:unstructured" 
          tag="p" 
          description="paragraph"/> 
         <h2 jcr:primaryType="nt:unstructured" 
          tag="h2" 
          description="Heading h2"/> 
         <h3 jcr:primaryType="nt:unstructured" 
          tag="h3" 
          description="Sub-heading h3"/> 
         <h4 jcr:primaryType="nt:unstructured" 
          tag="h4" 
          description="Sub-heading h4"/> 
         <h5 jcr:primaryType="nt:unstructured" 
          tag="h5" 
          description="Sub-heading h5"/> 
         <h6 jcr:primaryType="nt:unstructured" 
          tag="h6" 
          description="Sub-heading h6"/> 
         </formats> 
       </paraformat> 
      </rtePlugins> 
      </text> 
      <isRichTextFlag 
       jcr:primaryType="cq:Widget" 
       ignoreData="{Boolean}true" 
       name="./textIsRich" 
       value="true" 
       xtype="hidden"/> 
     </items> 
    </tab1> 

然後使用configPath向文本配置節點創建_cq_editConfig.xml。對我而言,我使用了絕對路徑。 IDK爲什麼做出相對的(由服務所建議的)沒有工作

<?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="cq:EditConfig" > 
    <cq:inplaceEditing jcr:primaryType="cq:InplaceEditingConfig" 
editorType="text" active="true" 
    configPath="/apps/your-site/wcm/foundation/components/test/dialog/items/tab1/items/text"/>  

雖然這可以使用,我已經發現了一些插件不工作,如圖像。其他人可以像parapgraph和編輯(粘貼選項)...更多這裏http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__c4qo-hi_team_i_havec.html

相關問題