Title: TinyMCE Editor Post by: Anderson P. on March 31, 2015, 09:55:24 pm I'm implementing the TinyMCE rich text editor on a HTML5 application, but i have some questions and the documentation seems to be a bit short about this topic.
So, first things first, TinyMCE is a external component, right? Witch version Genero uses? And is it upgradable? Next, and my main question, is there some way to customize TinyMCE? I want to remove some options, like the "Font" menu... Thanks for the attention. Title: Re: TinyMCE Editor Post by: . on April 02, 2015, 03:46:32 pm Hi Anderson, The TinyMCE version we use with our GAS 2.50 is the 4.0.22 version. You can retrieve this information in FGLASDIR/tpl/SetHtml5/tinymce/tinymce.min.js file. TinyMCE with GWC wasn't meant to be customized, it was integrated mainly to give a more elaborated editor to textedit in GAS HTML5. So I'm not sure it can be customized easily without side effect. A future solution could be to use web component doing the job cross platform and more efficiently. Regards, Guney Title: Re: TinyMCE Editor Post by: Anderson P. on April 06, 2015, 09:56:36 pm Hello Guney
Thanks for your reply! So, as we intend to migrate to Genero 3 by the end of the year i guess we will not try to do any hard customization at this time, as this may be a problem during the migration process. Our consultant, Florencia, already told me that she placed a request for customizing the HTML editor options. Thanks for your attention! Title: Re: TinyMCE Editor Post by: Reuben B. on April 07, 2015, 02:01:04 am Quote Next, and my main question, is there some way to customize TinyMCE? I want to remove some options, like the "Font" menu... Have a look inside FGLASDIR/tpl/SetHtml5/TextEdit.xhtml and look for a line data-g-toolbar. My understanding is that controls the buttons that appear in the toolbar and you'll see an entry "fontselect". So if you don't want the Font menu, remove "fontselect" from this string. (clear browser cache if it doesn't appear to work first time) My guess is that "data-g-toolbar" is referenced within FGLASDIR/tpl/SetHtml5/components.js (search for gToolbar in this file) inside a function createRTE.editor which in turn somehow invokes the tinymce.init function. Other configuration options could be set here but you would have to reference the tinymce documentation for suitable values. e.g. http://www.tinymce.com/wiki.php/Configuration If you do make any customisation in this area, pay close attention at upgrade time. Ideally this would be implemented as a WebComponent so that it was the same for both GDC and GWC and you could use same technique to customise for both. Title: Re: TinyMCE Editor Post by: Anderson P. on April 07, 2015, 01:02:55 pm Hey Reuben
Thanks for your reply! I have also seen that inside the FGLASDIR/tpl/SetHtml5/tinymce folder i can find the component files like the ones i can download from the website, and so FGLASDIR/tpl/SetHtml5/TextEdit.xhtml is the responsible of loading it inside GWC. So this is the way to customize it. But as we been told that a lot will change in Genero 3 and it's recommended not to customize, we are holding it a bit until the upgrade. |