Rich Text Editor Default Values Syntax | Community
Skip to main content
New Participant
October 16, 2015
Solved

Rich Text Editor Default Values Syntax

  • October 16, 2015
  • 3 replies
  • 2041 views

Following is my widget code for RTE

<richText

                        jcr:primaryType="cq:Widget"

                        fieldLabel="Rich text"

                        name="./richText"

                        xtype="richtext">

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

                                    <table

                                            jcr:primaryType="nt:unstructured"

                                            features="[table,removetable,insertrow,removerow,insertcolumn,removecolumn]"

                                             defaultValues="{'cellspacing':'0','cellpadding':'1','border':'1','columns':'10','rows':'4','header':'none'}"/>

                           </rtePlugins>  

 

When I create a table , I dont see defaultValues are getting  applied to the table.

Is there something wrong with syntax or I am missing more than that ? 

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 patK-ze1xYs

I was able to use default Values in following way : 

 

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

                                    <table

                                            jcr:primaryType="nt:unstructured"

                                            features="[table,removetable,insertrow,removerow,insertcolumn,removecolumn]">

                                    <defaultValues

                                            jcr:primaryType="nt:unstructured"

                                            height="400"

                                            width="700"

                                            cellspacing="2"

                                            cellpadding="2"

                                             header="top"/>         

                                    </table>        

                                    <misctools  

                                            jcr:primaryType="nt:unstructured"

                                            features="*"/>      

                            </rtePlugins>              

3 replies

Lokesh_Shivalingaiah
New Participant
October 16, 2015

I dont see any property called 'defaultValues' for table . refer [1] https://docs.adobe.com/docs/en/aem/6-1/administer/operations/page-authoring/rich-text-editor.html#Styles (Tables and Table Cells)

you can use 'TableStyles' or 'CellStyles' to mention the same.

patK-ze1xYsAuthorAccepted solution
New Participant
October 16, 2015

I was able to use default Values in following way : 

 

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

                                    <table

                                            jcr:primaryType="nt:unstructured"

                                            features="[table,removetable,insertrow,removerow,insertcolumn,removecolumn]">

                                    <defaultValues

                                            jcr:primaryType="nt:unstructured"

                                            height="400"

                                            width="700"

                                            cellspacing="2"

                                            cellpadding="2"

                                             header="top"/>         

                                    </table>        

                                    <misctools  

                                            jcr:primaryType="nt:unstructured"

                                            features="*"/>      

                            </rtePlugins>              

Lokesh_Shivalingaiah
New Participant
October 16, 2015

great !! Thanks for sharing