1

ウィジェット API は、リッチ テキスト エディターで HtmlRules オブジェクトの DocType オブジェクトを使用して、リッチ テキスト エディター コンテンツの既定のラッピング タグを変更できることを示しています。

defaultEditBlock : String 使用するデフォルトの編集ブロック タイプ。デフォルトは「p」 CQ 5.4 で追加されました。

これを変更して、特定のクラスを持つ ap タグ内にリッチ テキスト エディター フィールドのコンテンツを含めることができるようにする必要があります (1 つの p タグを別の p タグ内に配置することはできないため、自動ラッピングは事前定義された p タグから抜け出します)。

残念ながら、このノードは無視されているようです。

p タグを削除するにはどうすればよいですか。そうでない場合は、ap タグ内に移動するものに変更しますか?

以下はリッチ テキスト エディタの xml です。rtePlugins ノードは正しく動作しているように見えますが、htmlRules ノードは動作していないようです。

<introText
     jcr:primaryType="cq:Widget"
     allowBlank="{Boolean}false"
     fieldLabel="Intro text"
     name="./introText"
     xtype="richtext">
     <htmlRules jcr:primaryType="nt:unstructured">
         <docType jcr:primaryType="nt:unstructured"
                  defaultEditBlock="span">
         </docType>
  </htmlRules>
  <rtePlugins jcr:primaryType="nt:unstructured">
        <edit jcr:primaryType="nt:unstructured"
              features="[cut,copy,paste-default,paste-plaintext]"/>
        <format jcr:primaryType="nt:unstructured"
               features="[]"/>
        <justify jcr:primaryType="nt:unstructured"
                 features="[]"/>
        <lists jcr:primaryType="nt:unstructured"
               features="[]"/>
    </rtePlugins>
</introText>
4

0 に答える 0