Adding RTE Plugin in page component dialog | Community
Skip to main content
Level 3
July 30, 2021
Solved

Adding RTE Plugin in page component dialog

  • July 30, 2021
  • 2 replies
  • 945 views

We need to extend page component dialog and add rich text field into the dialog.

Our requirement is to add RTE plugin like subsuperscript, misctools(enter special characters, edit the HTML source) and etc.

Any comments/advice/help are appriciated.

 

Sincerely,

Keehwan


This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Suraj_Kamdi

@keehwan1 

First create copy cq:dialog structure  from core/page component and then add additional tab and RTE field as resource type.

 

<richtext
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
fieldLabel="Rich Text"
name="./richtext"
removeSingleParagraphContainer="{Boolean}true"
useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured"> ...............</rtePlugins> <richtext/>

Go through following code snippet....

 

 

<edit jcr:primaryType="nt:unstructured" features="*"/> <findreplace jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <links jcr:primaryType="nt:unstructured" features="*"/> <lists jcr:primaryType="nt:unstructured" features="*"/> <spellcheck jcr:primaryType="nt:unstructured" features="*"/> <styles jcr:primaryType="nt:unstructured" features="*"> <styles jcr:primaryType="cq:WidgetCollection"> <test jcr:primaryType="nt:unstructured" cssName="test" text="test" /> </styles> </styles> <subsuperscript jcr:primaryType="nt:unstructured" features="*"/> <undo jcr:primaryType="nt:unstructured" features="*"/> <misctools jcr:primaryType="nt:unstructured" features="*"> <specialCharsConfig jcr:primaryType="nt:unstructured"> <chars jcr:primaryType="nt:unstructured"> <default_copyright jcr:primaryType="nt:unstructured" entity="&amp;copy;" name="copyright"/> <default_euro jcr:primaryType="nt:unstructured" entity="&amp;euro;" name="euro"/> <default_registered jcr:primaryType="nt:unstructured" entity="&amp;reg;" name="registered"/> <default_trademark jcr:primaryType="nt:unstructured" entity="&amp;trade;" name="trademark"/> </chars> </specialCharsConfig> </misctools> <paraformat jcr:primaryType="nt:unstructured" features="*"> <formats jcr:primaryType="nt:unstructured"> <default_p jcr:primaryType="nt:unstructured" description="Paragraph" tag="p"/> <default_h1 jcr:primaryType="nt:unstructured" description="Heading 1" tag="h1"/> <default_h2 jcr:primaryType="nt:unstructured" description="Heading 2" tag="h2"/> <default_h3 jcr:primaryType="nt:unstructured" description="Heading 3" tag="h3"/> <default_h4 jcr:primaryType="nt:unstructured" description="Heading 4" tag="h4"/> <default_h5 jcr:primaryType="nt:unstructured" description="Heading 5" tag="h5"/> <default_h6 jcr:primaryType="nt:unstructured" description="Heading 6" tag="h6"/> <default_blockquote jcr:primaryType="nt:unstructured" description="Quote" tag="blockquote"/> <default_pre jcr:primaryType="nt:unstructured" description="Preformatted" tag="pre"/> </formats> </paraformat> <table jcr:primaryType="nt:unstructured" features="-"> <hiddenHeaderConfig jcr:primaryType="nt:unstructured" hiddenHeaderClassName="cq-wcm-foundation-aria-visuallyhidden" hiddenHeaderEditingCSS="cq-RichText-hiddenHeader--editing"/> </table> <tracklinks jcr:primaryType="nt:unstructured" features="*"/> <image jcr:primaryType="nt:unstructured" features="*"/>

 

 

 

 

 

 

2 replies

Suraj_Kamdi
Community Advisor
Suraj_KamdiCommunity AdvisorAccepted solution
Community Advisor
July 30, 2021

@keehwan1 

First create copy cq:dialog structure  from core/page component and then add additional tab and RTE field as resource type.

 

<richtext
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
fieldLabel="Rich Text"
name="./richtext"
removeSingleParagraphContainer="{Boolean}true"
useFixedInlineToolbar="{Boolean}true">
<rtePlugins jcr:primaryType="nt:unstructured"> ...............</rtePlugins> <richtext/>

Go through following code snippet....

 

 

<edit jcr:primaryType="nt:unstructured" features="*"/> <findreplace jcr:primaryType="nt:unstructured" features="*"/> <format jcr:primaryType="nt:unstructured" features="*"/> <justify jcr:primaryType="nt:unstructured" features="*"/> <links jcr:primaryType="nt:unstructured" features="*"/> <lists jcr:primaryType="nt:unstructured" features="*"/> <spellcheck jcr:primaryType="nt:unstructured" features="*"/> <styles jcr:primaryType="nt:unstructured" features="*"> <styles jcr:primaryType="cq:WidgetCollection"> <test jcr:primaryType="nt:unstructured" cssName="test" text="test" /> </styles> </styles> <subsuperscript jcr:primaryType="nt:unstructured" features="*"/> <undo jcr:primaryType="nt:unstructured" features="*"/> <misctools jcr:primaryType="nt:unstructured" features="*"> <specialCharsConfig jcr:primaryType="nt:unstructured"> <chars jcr:primaryType="nt:unstructured"> <default_copyright jcr:primaryType="nt:unstructured" entity="&amp;copy;" name="copyright"/> <default_euro jcr:primaryType="nt:unstructured" entity="&amp;euro;" name="euro"/> <default_registered jcr:primaryType="nt:unstructured" entity="&amp;reg;" name="registered"/> <default_trademark jcr:primaryType="nt:unstructured" entity="&amp;trade;" name="trademark"/> </chars> </specialCharsConfig> </misctools> <paraformat jcr:primaryType="nt:unstructured" features="*"> <formats jcr:primaryType="nt:unstructured"> <default_p jcr:primaryType="nt:unstructured" description="Paragraph" tag="p"/> <default_h1 jcr:primaryType="nt:unstructured" description="Heading 1" tag="h1"/> <default_h2 jcr:primaryType="nt:unstructured" description="Heading 2" tag="h2"/> <default_h3 jcr:primaryType="nt:unstructured" description="Heading 3" tag="h3"/> <default_h4 jcr:primaryType="nt:unstructured" description="Heading 4" tag="h4"/> <default_h5 jcr:primaryType="nt:unstructured" description="Heading 5" tag="h5"/> <default_h6 jcr:primaryType="nt:unstructured" description="Heading 6" tag="h6"/> <default_blockquote jcr:primaryType="nt:unstructured" description="Quote" tag="blockquote"/> <default_pre jcr:primaryType="nt:unstructured" description="Preformatted" tag="pre"/> </formats> </paraformat> <table jcr:primaryType="nt:unstructured" features="-"> <hiddenHeaderConfig jcr:primaryType="nt:unstructured" hiddenHeaderClassName="cq-wcm-foundation-aria-visuallyhidden" hiddenHeaderEditingCSS="cq-RichText-hiddenHeader--editing"/> </table> <tracklinks jcr:primaryType="nt:unstructured" features="*"/> <image jcr:primaryType="nt:unstructured" features="*"/>

 

 

 

 

 

 

Suraj_Kamdi
Community Advisor
Community Advisor
July 30, 2021