TinyMCE Upgrade

Talk about new features for CMSMS and modules.
Post Reply
josh2010
Forum Members
Forum Members
Posts: 15
Joined: Thu Dec 13, 2007 1:02 am

TinyMCE Upgrade

Post by josh2010 »

Maybe CMSMS can be upgraded to use TinyMCE Version 3 for the Safari users!
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

Could someone please explain to a newbie whether it's possible to upgrade TinyMCE myself, and if so, how?

As a Mac Safari (3.1.2) user I really like TinyMCE, but I can't get copy and paste to work properly. Pasting from the clipboard removes styling from all the text in the editor window, not just what's been pasted, and the Paste button on the TinyMCE toolbar doesn't work at all.

I'm not sure which version is currently installed: the Modules menu says it's 2.4.0, but the "?" button on the TinyMCE toolbar reports 3.0.8.

TinyMCE 3.1.0.1 seems to do better -- the Paste button still doesn't work, but at least pasting from the clipboard doesn't mess up formatting elsewhere in the box. So I figured that upgrading would be a good idea, but I'm not sure how to do it.

I guess the folder to replace is /modules/TinyMCE/tinymce, but can I do this without breaking all the other stuff in /modules/TinyMCE ? Is there an easier way?

Many thanks...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: TinyMCE Upgrade

Post by Dr.CSS »

Have you gone to tinys home page and checked the examples to see if it does the same thing?...

http://tinymce.moxiecode.com/index.php
cyberman

Re: TinyMCE Upgrade

Post by cyberman »

Charles Butcher wrote: I'm not sure which version is currently installed: the Modules menu says it's 2.4.0, but the "?" button on the TinyMCE toolbar reports 3.0.8.
TinyMCE module for CMSms = module to use TinyMCE with CMSms
TinyMCE = the original module from Moxiecode

TinyMCE 3 is supported since TinyMCE module 2.4.0

;)
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

TinyMCE module for CMSms = module to use TinyMCE with CMSms
TinyMCE = the original module from Moxiecode

TinyMCE 3 is supported since TinyMCE module 2.4.0
Thanks, cyberman -- that explains the numbering discrepancy, but I'm still not clear whether I can upgrade to TinyMCE 3.1.0.1 within CMSms. Is this possible, or does it have to wait for a new version of CMSms?

I would certainly like to upgrade TinyMCE, because Moxiecode has fixed a couple of Safari bugs between 3.0.8 and 3.1.0.1. As I said in my first post, 3.1.0.1 solves at least one problem I was having with 3.0.8.

For the record, I renamed /modules/TinyMCE/tinymce/jscripts and created a new jscripts directory containing the equivalent files from TinyMCE 3.1.0.1. All ownerships and permissions seem to match.

All looked promising in Extensions > TinyMCE WYSIWYG: correct version reported, and my basic problem -- all formatting in the editing window removed when pasting into an existing document -- was gone.

Unfortunately when I tried editing a real page, TinyMCE was nowhere to be seen, and could not be restored by checking and unchecking the WYSIWYG box, as I think some people have reported. I also noticed that clearing the site cache disabled TinyMCE even from Extensions > TinyMCE WYSIWYG, and I could only restore it by clicking "Restore all settings to defaults" -- with the loss of my custom toolbars. This is not just a one-off problem; it happened every time I cleared the cache.

I have now reverted to 3.0.8, and apart from the fact that the "?" button still reports 3.1.0.1 (despite resets and clearing the site cache), everything is as before.

Some of the strange things that are going on within TinyMCE are clearly nothing to do with CMSms, but if someone could explain clearly why my upgrade didn't work as expected, I would be most grateful. I guess I'm clear that TinyMCE has to be customised to work with CMSms, but I don't understand what this involves and whether there is a workaround that can be done outside the core of CMSms. From my ignorant standpoint, it would be nice to be able to upgrade TinyMCE through the Module Manager.

CMSms 1.3.1, Apache 2.2.3, PHP 5.2.5, MySQL not sure, MacOS 10.4.11, Safari 3.1.2
cyberman

Re: TinyMCE Upgrade

Post by cyberman »

Have you tried the current TinyMCE module version 2.4.2?

http://dev.cmsmadesimple.org/frs/?group ... se_id=1378

Not sure if this version use TinyMCE 3.1.0.1 - the coming version 2.4.3 (available on svn) does it.
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

Have you tried the current TinyMCE module version 2.4.2?

http://dev.cmsmadesimple.org/frs/?group ... se_id=1378

Not sure if this version use TinyMCE 3.1.0.1
cyberman, you're a star. Apologies for not previously understanding how to find the upgrade among the Forge files. Yes, TinyMCE module 2.4.2 does include TinyMCE 3.1.0.1 and the upgrade seemed to be trouble-free.

Interestingly, though, it hasn't solved my original problem of all formatting being removed on paste. With my setup, TinyMCE 3.1.0.1 on the Moxie website strips formatting from Word docs, but preserves it when copy/pasting within the editor window. In CMSms, TinyMCE 3.1.0.1 strips formatting from everywhere in the window.

So there still seems to be an issue that's specific to CMSms. Since I can always use HTML view or Firefox, however, I'm not too worried. It's my users that matter most, and they will be using Explorer or Firefox.

Thanks again -- Charles
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

it hasn't solved my original problem of all formatting being removed on paste.
Apparently a permissions thing; I set everything to 777 to upload the new TinyMCE module, and now I have changed back to 755, the problem seems to be cured. I didn't change anything else.

I'm a bit hazy about security, so is 755 OK for both files and folders? This seems to match what the other modules have...
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

No, it's more complicated than that -- I changed a toolbar layout and we're back to square one. Pasting just seems flaky with (Mac) Safari. Again, on the Moxie website it's OK.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: TinyMCE Upgrade

Post by Dr.CSS »

If you are getting html type tags stripped from in the editor there is a setting to do that you will need to uncheck it...

It may be this one, under General tab...

Apply source formatting to the output HTML:

Or this one, in Advanced tab...

Force clean on paste:
User avatar
Charles Butcher
Forum Members
Forum Members
Posts: 103
Joined: Sat Jul 05, 2008 8:25 pm
Location: Norfolk, UK

Re: TinyMCE Upgrade

Post by Charles Butcher »

If you are getting html type tags stripped from in the editor there is a setting to do that you will need to uncheck it...

It may be this one, under General tab...

Apply source formatting to the output HTML:

Or this one, in Advanced tab...

Force clean on paste:
Thanks, Mark. I'm not having problems with html tags being removed, just rich text formatting -- that is, if I turn off WYSIWYG I can copy and paste the HTML without the tags being stripped.

The TinyMCE wiki (http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/apply_source_formatting) says:

Code: Select all

Option: apply_source_formatting

This option enables you to tell TinyMCE to apply some source formatting to the output HTML code.
With source formatting, the output HTML code is indented and formatted. Without source formatting,
the output HTML is more compact.
Handy, but it doesn't work for me in Safari -- on or off, the HTML is compact in both the main TinyMCE window with WYSIWYG off, and the pop-up javascript HTML editing window. In Firefox it's fine.

Turning off "Force clean on paste" does work, but since most of my users will probably be copying stuff from Word I think turning it off would be a bad idea. If anyone knows different, please tell me. I haven't quite got my head round the options for pasting text: I can't see any relevant settings in the list of TinyMCE options (http://wiki.moxiecode.com/index.php/TinyMCE:Configuration), and if the standard "paste" command is supposed to be intelligent (i.e. strip formatting when pasting if the text originated outside TinyMCE, but not if it was copied from TinyMCE), then what do the "pastetext" and "pasteword" button commands do?

My boring conclusion is that although TinyMCE supports Safari quite well, it's still buggy, and that some of these bugs are more likely to show up when TinyMCE is being used in CMSms.

Since I gather that Windows Safari hasn't been a roaring success, non-Mac users are probably wondering what the fuss is about. The answer is that Firefox on a Mac is still ugly, skin it how you will, and for browsing the web Safari works brilliantly for 99.5% of sites. I believe Safari has been highly standards-compliant for a long time, and Mac users just get a bit racked off with being told to use another browser.
Post Reply

Return to “Feature ideas”