Author Topic: TinyMCE upgrade to version 3.5.8  (Read 4286 times)

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 965
  • Karma: +56/-7
TinyMCE upgrade to version 3.5.8
« on: June 26, 2013, 12:45:08 AM »
I have a new moderator who is accessing the admin functions of the site with his Android smart phone. When he went to reject a member for violating the TOS, he noticed that he wasn't able to edit text in the TinyMCE 2.1 editor. I understand that there is a version 4.0 available at tinymce.com, although I don't know how to upgrade it to etano. And I don't know if it's the solution or not.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 965
  • Karma: +56/-7
Re: TinyMCE upgrade to version 3.5.8
« Reply #1 on: June 26, 2013, 04:16:15 AM »
So, I did some explorations and decided to go ahead and figure out how to upgrade. It turns out to be easier than I imagined. I went to the tinymce.com website and downloaded their version 3.5.8 because version 4 didn't have the advanced theme. The advanced theme provides all of the editing buttons that version 2.1 had.
download it here:
http://www.tinymce.com/download/download.php

Once you extract the zip file. you need to locate the jscripts directory to find a directory named tiny_mce and transfer that directory from there to admin/js.
The location will be as follows: admin/js/tiny_mce

And then I found this web page with instructions on a simple installation. (installation for dummies)
http://www.tinymce.com/wiki.php/TinyMCE3x:%22For_Dummies%22

With that in mind, I then replaced the existing javascript code in the reject.html, site_news_addedit.html, and newsletter.html files to look like this:

1. reject.html
Code: [Select]
<script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
        mode : "exact",
elements : "reject_reason",
        theme : "advanced",
        plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
               
        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
        theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",     
        theme_advanced_toolbar_location : "bottom",
        theme_advanced_toolbar_align : "center",
        theme_advanced_statusbar_location : "top",
        theme_advanced_resizing : true,
relative_urls : false,
convert_urls : false,
content_css : "../skins_site/def/styles/content.css"
});
</script>

2. site_news_addedit.html
Code: [Select]
<script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">
tinyMCE.init({
        mode : "exact",
elements : "news_body",
        theme : "advanced",
        plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
               
        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
        theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",     
        theme_advanced_toolbar_location : "bottom",
        theme_advanced_toolbar_align : "center",
        theme_advanced_statusbar_location : "top",
        theme_advanced_resizing : true,
relative_urls : false,
convert_urls : false,
content_css : "../skins_site/def/styles/content.css"
});
</script>

3. newsletter.html and email_send.html
Code: [Select]
<script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">
tinyMCE.init({
        mode : "exact",
elements : "message_body",
        theme : "advanced",
        plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
               
        // Theme options - button# indicated the row# only
        theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
        theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",     
        theme_advanced_toolbar_location : "bottom",
        theme_advanced_toolbar_align : "center",
        theme_advanced_statusbar_location : "top",
        theme_advanced_resizing : true,
relative_urls : false,
convert_urls : false,
content_css : "../skins_site/def/styles/content.css"
});
</script>



This upgraded version has smilies and some other format buttons that the old version 2.1 didn't have. It also has other skins that I haven't tried out yet.

I don't plan to upgrade to version 4, now that I can't seem to get it to work.

I won't know until later today if my moderator will be able to edit the form or not with his Android OS.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 965
  • Karma: +56/-7
Re: TinyMCE doesn't work with Android, but here's an upgrade
« Reply #2 on: June 26, 2013, 05:54:32 PM »
Whoops! my moderator says that the reject button isn't working. He was using a PC with Firefox while testing it. I'll have to test this out to see what's going on. He also says it still doesn't work on the Android.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.

Marble

  • Global Moderator
  • Veteran Member
  • *****
  • Posts: 965
  • Karma: +56/-7
Re: TinyMCE doesn't work with Android, but here's an upgrade
« Reply #3 on: June 26, 2013, 10:49:42 PM »
So, after checking this. I didn't have problems in my offsite development area. I reinstalled into the online server and found that the Save as a template button wasn't working. The solution was to run a repair/optimize of the database tables and then it worked.

I'd like to see if it's possible to have the ability to select from multiple templates or at least a page to delete old templates, just like with messaging templates in the members area. If anyone has explored this previously, then speak up. :)

Also, I explored tinyMCE 4.0 a little more in depth and found that it's really really complicated. You nearly have to be a software programmer in order to understand it. Well, that's my opinion. It's going to take me a very long time to figure it out, if I can actually get that far. Oh, and 4.0 doesn't work with Android either but works with an iPhone5. There's a test page at the tinymce website. I heard that 4.0 will be included with the next etano version update.


Neat! This editor has smilies included. So, when you send out a Site News from the Admin panel, you can include smilies with it.
If you see that I'm logged in forever... it just means I turned the page on my browser and forgot to logout.