Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Image plugin in RTE

Avatar

Level 4

Hi, i added a image plugin in RTE but it is not visible Can someone help me with this?

            <rtePlugins jcr:primaryType="nt:unstructured">
                <tracklinks
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <table
                    jcr:primaryType="nt:unstructured"
                    features="-">
                    <hiddenHeaderConfig
                        jcr:primaryType="nt:unstructured"
                        hiddenHeaderClassName="cq-wcm-foundation-aria-visuallyhidden"/>
                </table>            
                <paraformat
                    jcr:primaryType="nt:unstructured"
                    features="*">
                    <formats
                        jcr:primaryType="cq:WidgetCollection">
                        <item0
                            jcr:primaryType="nt:unstructured"
                            description="Paragraph"
                            tag="p"/>
                        <item1
                            jcr:primaryType="nt:unstructured"
                            description="Heading 1"
                            tag="h1"/>
                        <item2
                            jcr:primaryType="nt:unstructured"
                            description="Heading 2"
                            tag="h2"/>
                        <item3
                            jcr:primaryType="nt:unstructured"
                            description="Heading 3"
                            tag="h3"/>
                        <item4
                            jcr:primaryType="nt:unstructured"
                            description="Heading 4"
                            tag="h4"/>
                        <item5
                            jcr:primaryType="nt:unstructured"
                            description="Heading 5"
                            tag="h5"/>
                        <item6
                            jcr:primaryType="nt:unstructured"
                            description="Heading 6"
                            tag="h6"/>
                        <item7
                            jcr:primaryType="nt:unstructured"
                            description="Quote"
                            tag="blockquote"/>
                        <item8
                            jcr:primaryType="nt:unstructured"
                            description="Horizontal Rule (visual line break)"
                            tag="hr"/>
                        <item9
                            jcr:primaryType="nt:unstructured"
                            description="Preformatted"
                            tag="pre"/>
                    </formats>
                </paraformat>
                <misctools
                    jcr:primaryType="nt:unstructured"
                    features="sourceedit">
                    <specialCharsConfig jcr:primaryType="nt:unstructured">
                        <chars
                            jcr:primaryType="nt:unstructured"
                            override="true">
                            <item0
                                jcr:primaryType="nt:unstructured"
                                entity="&amp;copy;"
                                name="copyright"/>
                            <item1
                                jcr:primaryType="nt:unstructured"
                                entity="&amp;euro;"
                                name="euro"/>
                            <item2
                                jcr:primaryType="nt:unstructured"
                                entity="&amp;reg;"
                                name="registered"/>
                            <item3
                                jcr:primaryType="nt:unstructured"
                                entity="&amp;trade;"
                                name="trademark"/>
                        </chars>
                    </specialCharsConfig>
                </misctools>
                <edit
                    jcr:primaryType="nt:unstructured"
                    features="paste-plaintext,paste-wordhtml"/>
                <lists
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <format
                    jcr:primaryType="nt:unstructured"
                    features="bold,italic,underline"/>
                <findreplace
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <undo
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <spellcheck
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <image
                    jcr:primaryType="nt:unstructured"
                    features="image"/>
                <justify
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
                <links
                    jcr:primaryType="nt:unstructured"
                    features="modifylink,unlink,anchor"/>
                <subsuperscript
                    jcr:primaryType="nt:unstructured"
                    features="*"/>
            </rtePlugins>
1 Accepted Solution

Avatar

Correct answer by
Level 2
    <rtePlugins jcr:primaryType="nt:unstructured">
... <image jcr:primaryType="nt:unstructured" features="*"/>
... </rtePlugins>

Have you tried adding this to "uiSetting"?

 

 

 

<inline
 jcr:primaryType="nt:unstructured"
 toolbar="[format#bold,format#italic,format#underline,.....,image#imageProps,...,#paraformat,table#table]">

 

 

 

image#imageProps

 

needs to be added.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 2
    <rtePlugins jcr:primaryType="nt:unstructured">
... <image jcr:primaryType="nt:unstructured" features="*"/>
... </rtePlugins>

Have you tried adding this to "uiSetting"?

 

 

 

<inline
 jcr:primaryType="nt:unstructured"
 toolbar="[format#bold,format#italic,format#underline,.....,image#imageProps,...,#paraformat,table#table]">

 

 

 

image#imageProps

 

needs to be added.

Avatar

Community Advisor

Hello @tatrived ,

You can enable it from the page template edit option. 

Sady_Rifat_1-1697436686175.png

 

Sady_Rifat_0-1697436641080.png

However, you can also enable it from the code for all templates,

In _cq_design_dialog all the following XML,

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/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="nt:unstructured">
    <content
        jcr:primaryType="nt:unstructured">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                jcr:primaryType="nt:unstructured">
                <items jcr:primaryType="nt:unstructured">
                    <plugins
                        jcr:primaryType="nt:unstructured">
                        <items jcr:primaryType="nt:unstructured">
                            <Features
                                jcr:primaryType="nt:unstructured">
                                <items jcr:primaryType="nt:unstructured">
                                    <fixedcol
                                        jcr:primaryType="nt:unstructured">
                                        <items jcr:primaryType="nt:unstructured">
                                            <col1
                                                jcr:primaryType="nt:unstructured">
                                                <items jcr:primaryType="nt:unstructured">
                                                    <image
                                                        jcr:primaryType="nt:unstructured">
                                                        <items jcr:primaryType="nt:unstructured">
                                                            <image
                                                                jcr:primaryType="nt:unstructured"
                                                                defaultEnabled="{Boolean}true"/>
                                                        </items>
                                                    </image>
                                                </items>
                                            </col1>
                                        </items>
                                    </fixedcol>
                                </items>
                            </Features>
                        </items>
                    </plugins>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>

 

 

 

Avatar

Level 4

No it doesn't seems like working, have tried from template level as well as code side

 

 

Avatar

Administrator

@tatrived Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni