Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: TinyMCE Editor  (Read 15658 times)
Anderson P.
Posts: 82


« 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.
.
Four Js
Posts: 65


« Reply #1 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
 
Anderson P.
Posts: 82


« Reply #2 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!
Reuben B.
Four Js
Posts: 1119


« Reply #3 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.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Anderson P.
Posts: 82


« Reply #4 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.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines