[AEM 6.2] I am trying to add sub/super script functionality to content fragment RTE but I am unable to trace the file that needs to be updated to make it work.

Avatar

Avatar

Shiny_Chimra

Avatar

Shiny_Chimra

Shiny_Chimra

01-11-2016

[AEM 6.2] I am trying to add sub/super script functionality to content fragment RTE but I am unable to trace the file that needs to be updated to make super/sub script work.

RTE is being rendered from toolbar.jsp (/libs/dam/cfm/admin/components/authoring/contenteditor/toolbar/toolbar.jsp) . 

I added the below lines in toolbar.jsp but that is not enough and require some more changes. It will be great if you can help me with this

%><button is="coral-button" variant="quiet" icon="textSuperscript" iconsize="S" data-rte-command="subsuperscript#superscript"></button><%
%><button is="coral-button" variant="quiet" icon="textSubscript" iconsize="S" data-rte-command="subsuperscript#subscript"></button><%

Replies

Avatar

Avatar

katymal1

Avatar

katymal1

katymal1

18-01-2017

I referenced the below link for any modifications to the RTE.

https://docs.adobe.com/docs/en/aem/6-2/administer/operations/page-authoring/rich-text-editor.html

Once you override the RTE component, you should be able to add:

<subsuperscript

    jcr:primaryType="nt:unstructured"

    features="*"/>

to your rtePlugin node.

 

Then update the toolbar to reference the subsuperscript:

 

<inline

    jcr:primaryType="nt:unstructured"

    toolbar="[#format,#paraformat,#justify,#lists,links#modifylink,links#unlink,tracklinks#modifylinktracking,misctools#specialchars,-,control#close,fullscreen#start,-,control#save]">

    <popovers jcr:primaryType="nt:unstructured">

    <format jcr:primaryType="nt:unstructured"

        items="[format#bold,format#italic,format#underline,subsuperscript#subscript,subsuperscript#superscript]"

        ref="format"/>

...

Avatar

Avatar

anupamp17770278

Avatar

anupamp17770278

anupamp17770278

03-01-2019

Did you get anything? which file to edit? Also, I think it's not recommended to change any OOTB functionality. Although it seems like the last resort for me. Any help is highly appreciated.