2017-01-31 5 views
1

AEM 6.2でマルチフィールドタッチUIコンポーネントを作成しようとしました。 私は、次のリソースタイプにフィールドを追加することによって、それを作成した:それは私が私が行うことができません私のmutifieldテキストコンポーネント内のプラグインとしてのスタイルを追加する必要がworked.Butリッチテキストにスタイルを追加するui multifieldをタッチします

<test 
    jcr:primaryType="nt:unstructured" 
    sling:resourceType="cq/gui/components/authoring/dialog/richtext" 
    fieldLabel="Touch Ui Text" 
    name="./test" 
    renderReadOnly="{Boolean}true"/> 

。 クラシックUIにrteプラグインを追加するのと同じようにプラグインを追加するには? マルチテキストの一部としてリッチテキストエディタでさまざまなスタイルを提供する必要があります。

ありがとうございます!

答えて

4

リッチテキストエディタでカスタムスタイルを使用するオプションは、removed in Touch UI, as per the AEM 6.0 documentationでした。

  • 編集
  • 画像
  • sourceedit
  • スタイル
  • テーブル

次のプラグイン/フィーチャーの組み合わせ

は、タッチ操作に最適化されたUIでサポートされていません。

ありがたいことに、彼らはAEM 6.2に戻ってきました。私は6.1については分かりませんが、おそらくサポートされています。

AEM 6.2 describes the steps necessary to enable the Styles RTE Pluginのマニュアルです。私は多くの読書が必要でしたが、Stylesプラグインが動作するようになりました。 TLのように

; DRは私だけのスタイル設定がクラシックUIの場合と同じフォーマットに従うと、あなたはまた、彼らは、視認性をドライブとしてコンポーネントのuiSettingsに注意を払う必要があると言うことができますTouch 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/stylestext/uiSettings/cui/inline/popovers/stylesの要素が

は、ここでは、ページ上でどのように見えるかです:

Example styles dropdown

0

これを追加する

<rtePlugins jcr:primaryType="nt:unstructured"> 
    <styles 
           jcr:primaryType="nt:unstructured" 
           features="*"> 
     <styles jcr:primaryType="cq:WidgetCollection"> 
      <style1 
             jcr:primaryType="nt:unstructured" 
             cssName="style1" 
             text="style1"/> 
      <style2 
             jcr:primaryType="nt:unstructured" 
             cssName="style2" 
             text="style2"/> 
      <section--title> 
      </styles> 
     </styles> 
    </rtePlugins> 
関連する問題