[opencms-dev] html widget configuration

Hein van der Kallen hvanderkallen at xs4all.nl
Tue Mar 9 14:09:21 CET 2021


Anne, 

If you really want to add  styles there was a solution in 2015 by Paoletti
Corrado

Look at
http://opencms.996256.n3.nabble.com/Add-Formats-button-to-tinyMCE-editor-td2
5805.html

 

And
http://archive.tinymce.com/wiki.php?title=Configuration3x%3Astyle_formats
<http://archive.tinymce.com/wiki.php?title=Configuration3x%3Astyle_formats&s
howmsg=edit> &showmsg=edit

 

But I think you look for adding/ hiding of buttons in the html widget
toolbar. 

 

In general for styling the html widget toolbar look at 3 places :

The opencms-vfs.xml

Where you could have something like 

<widget class="org.opencms.widgets.CmsHtmlWidget" alias="HtmlWidget"

configuration="[source;-;undo;redo;-;find;replace;-;removeformat;visualaid;-
;cut;copy;paste;pastetext;pasteword;

                                          -;table;image;media;];

                                          [;editorlink;link;anchor;unlink;];

 
[;imagegallery;downloadgallery;linkgallery;htmlgallery;tablegallery;-;specia
lchar;-;print;];

                                          [;formatselect;style;];

 
[;bold;italic;underline;strikethrough;-;subscript;superscript;];

 
[;alignleft;aligncenter;alignright;justify;-;orderedlist;unorderedlist;-;out
dent;indent;]; 

                                          [;spellcheck;];       

 
[;abbr;absolute;acronym;advhr;attribs;blockquote;cite;cleanup;del;emotions;f
ontselect;fontsizeselect;hr

 
;ins;insertdate;insertlayer;inserttime;ltr;media;movebackward;moveforward;ne
wdocument;nonbreaking;pagebreak;rtl

 
;styleprops;template;visualaid;visualchars;];

                                          [;forecolor;backcolor;];"

/>

 

Then you have the 2 option files  options_all and options_extended in 

/system/workplace/editors/configuration/

Or 

/system/config/wysiwyg/

 

Then you have the configuration in your xml content schema's 

Where you could have something like 

                                            <xsd:element name="body"
type="OpenCmsHtml" />

And

 

                                            <layouts>

                                                           <layout
element="body" widget="HtmlWidget" 

 
configuration="css:/system/modules<<path to your css>>, width:640px

 
height:600px,find,replace,link,anchor,source,

 
imagegallery,downloadgallery,

 
table,formatselect,emotions,pasteword,image,media,forecolor,backcolor,visual
aid"/>

                                            </layouts>

 

And the effects will be different in different editors of the old workplace
or the new workplace.

 

Hein van der Kallen

 

 

 

 

Van: opencms-dev <opencms-dev-bounces at opencms.org> Namens Gebert, Anne
Verzonden: maandag 8 maart 2021 11:39
Aan: The OpenCms mailing list <opencms-dev at opencms.org>
Onderwerp: [opencms-dev] html widget configuration

 

Hi list,

 

has anyone already successfully added the styles "abbr", "absolute",
"acronym" and "attribs"  to html widget (tinymce)? I also want to hide
"spellcheck" but it is still there.
Whats the difference between "editorlink" and "link"/"unlink"?

 

Regards,

Anne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.opencms.org/pipermail/opencms-dev/attachments/20210309/c8cbdf26/attachment.htm>


More information about the opencms-dev mailing list