Customizzare il text editor con stili personali
//vedere pav
// nel nodo text : externalStyleSheets con la folder per l'edit
<text
jcr:primaryType="cq:Widget"
editElementQuery="div[class="text"]"
hideLabel="{Boolean}true"
externalStyleSheets="[/etc/designs/pav/release/library/edit/styles/text.css]"
name="./text"
xtype="richtext">
<rtePlugins jcr:primaryType="nt:unstructured">
<edit
jcr:primaryType="nt:unstructured"
features="*"/>
<findreplace
jcr:primaryType="nt:unstructured"
features="*"/>
<format
jcr:primaryType="nt:unstructured"
features="*"/>
<image
jcr:primaryType="nt:unstructured"
features="*"/>
<keys
jcr:primaryType="nt:unstructured"
features="*"/>
<justify
jcr:primaryType="nt:unstructured"
features="*"/>
<links
jcr:primaryType="nt:unstructured"
features="*"/>
<lists
jcr:primaryType="nt:unstructured"
features="*"/>
<misctools
jcr:primaryType="nt:unstructured"
features="*"/>
<paraformat
jcr:primaryType="nt:unstructured"
features="*">
<formats
jcr:primaryType="cq:WidgetCollection">
<paragraph
jcr:primaryType="nt:unstructured"
description="Paragraph"
tag="p"/>
<heading2
jcr:primaryType="nt:unstructured"
description="Heading 2"
tag="h2"/>
<heading3
jcr:primaryType="nt:unstructured"
description="Heading 3"
tag="h3"/>
<heading4
jcr:primaryType="nt:unstructured"
description="Heading 4"
tag="h4"/>
<heading5
jcr:primaryType="nt:unstructured"
description="Heading 5"
tag="h5"/>
<heading6
jcr:primaryType="nt:unstructured"
description="Heading 6"
tag="h6"/>
</formats>
</paraformat>
<subsuperscript
jcr:primaryType="nt:unstructured"
features="*"/>
<table
jcr:primaryType="nt:unstructured"
features="*"/>
<undo
jcr:primaryType="nt:unstructured"
features="*"/>
//aggingere il nodo style che permette di personalizzare le classi nel mio caso:
<styles
jcr:primaryType="nt:unstructured"
features="*">
<styles jcr:primaryType="cq:WidgetCollection">
<small
jcr:primaryType="nt:unstructured"
cssName="small"
text="Small"/>
<medium
jcr:primaryType="nt:unstructured"
cssName="medium"
text="Medium"/>
<large
jcr:primaryType="nt:unstructured"
cssName="large"
text="Large"/>
<xlarge
jcr:primaryType="nt:unstructured"
cssName="xlarge"
text="XLarge"/>
</styles>
</styles>
</rtePlugins>
</text>
/*TEXT COMPONENT
creare uno style css per l'edit per far vedere le modifiche sulla dialog EX:*/
#CQrte p .small {
font-size: smaller;
}
#CQrte p .medium {
font-size: medium;
}
#CQrte p .large {
font-size: large;
}
#CQrte p .xlarge {
font-size: x-large;
}
/*ed un equivalente file per le modifiche nel componente */
.textimage .small {
font-size: smaller;
}
.textimage .medium {
font-size: medium;
}
.textimage .large {
font-size: large;
}
.textimage .xlarge {
font-size: x-large;
}
.siv-text .small {
font-size: smaller;
}
.siv-text .medium {
font-size: medium;
}
.siv-text .large {
font-size: large;
}
.siv-text .xlarge {
font-size: x-large;
}