Author Topic: tiny mce editor  (Read 3918 times)

Offline Kenmiles

  • Newbie
  • *
  • Posts: 7
tiny mce editor
« on: January 04, 2016, 01:49:25 PM »

I am trying to add extra plugins to the editor but no matter what changes I make to the file editor.js (as below) no difference is made to the toolbar when I compose a message.
For instance, if I delete fontsizeselect it is still there in the editor.
 
$.extend(conf, {
      plugins: 'paste,emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,inlinepopups,tabfocus' + (config.spellcheck ? ',spellchecker' : ''),
      theme_advanced_buttons1: 'bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,ltr,rtl,blockquote,|,forecolor,backcolor,fontselect,fontsizeselect',
      theme_advanced_buttons2: 'link,unlink,table,|,emotions,charmap,image,media,|,code,search,undo,redo',
      spellchecker_languages: (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
      spellchecker_rpc_url: '?_task=utils&_action=spell_html&_remote=1',
      spellchecker_enable_learn_rpc: config.spelldict,
      accessibility_focus: false,
      oninit: 'rcmail_editor_callback'
    });


Thanks in advance for any help,
Regards, Kenneth.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: tiny mce editor
« Reply #1 on: January 04, 2016, 09:09:13 PM »
You should never edit a core file, it will be over written in future updates. Use the html_editor plugin hook, look at the emoticons Roundcube plugin for an example.

Offline Kenmiles

  • Newbie
  • *
  • Posts: 7
Re: tiny mce editor
« Reply #2 on: January 05, 2016, 09:53:51 AM »
Thankf or the reply.
I know that it is a bad idea to alter core files but what I can't figure out is why editing this file makes no changes.
Regards, Kenneth.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: tiny mce editor
« Reply #3 on: January 05, 2016, 10:13:12 AM »
Most likely if if your using a stable Roundcube version the editor.min.js is being loaded instead of the uncompressed editor.js file.

Offline Kenmiles

  • Newbie
  • *
  • Posts: 7
Re: tiny mce editor
« Reply #4 on: January 05, 2016, 02:18:01 PM »
Hi, thanks for that.
How do I load extra plugins for the editor instead of the default ones.
I mean the plugins that are in tinymce folder that are not not loaded.
Thanks again for your help,
Kenneth.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: tiny mce editor
« Reply #5 on: January 05, 2016, 04:19:18 PM »
If you look at the emoticons plugin that comes with Roundcube it has an example of how to add a TinyMCE plugin.

Offline Kenmiles

  • Newbie
  • *
  • Posts: 7
Re: tiny mce editor
« Reply #6 on: January 05, 2016, 05:28:45 PM »
Thanks, you are a star.
Kenneth.

Offline Kenmiles

  • Newbie
  • *
  • Posts: 7
Re: tiny mce editor
« Reply #7 on: January 06, 2016, 12:06:28 PM »
Hello again,
I still not fully understand this.


To get the supplied plugins hr and anchor to load I have had to edit the editor.min.js file like so -
theme_advanced_buttons2:"hr,link,unlink,table,|,anchor,template,emotions,insertdatetime,charmap,image,media,|,code,search,undo,redo"


These two plugins now work fine but the template and insertdatetime plugins do not load and there are no errors in the log file.


I am using Roundcube 1.0.6 on Centos 6.7 which was installed via yum and 1.0.6 is the latest version in the repository for my OS.


Hope you can help me further,
Regards, Kenneth.