Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Upgrade TinyMCE


Go to End
Reply

11 Posts   3345 Views

Avatar
Banana

21 January 2011 at 8:03pm (Last edited: 21 January 2011 9:13pm), Community Member, 18 Posts

Hello everyone.

Can somebody tell me which files needs to be changed if I want to upgrade the included TinyMCE ?

I'm asking this in the IRC channel, too.
Posting the result afterwards.

Avatar
Willr

22 January 2011 at 1:07pm Forum Moderator, 5511 Posts

TinyMCE by default is stored in

sapphire/thirdparty/tinymce/

And the configuration is controlled by

sapphire/forms/HtmlEditorConfig.php and
sapphire/forms/HtmlEditorField.php

The CMS does have some heavy tinymce alterations to support image and link inserting so upgrading could potentially affect that. We try to keep it relatively up to date!

Avatar
Banana

25 January 2011 at 9:51pm Community Member, 18 Posts

yes that is right. Those are the file you need to alter.

the extended things from ss are seperate modules, so you do not break them while updating and overwriting the folders.
So far it works well, since the TinyMCE api 3.0 was used and the latest release is a api 3.0 release.

Also the configuration files work without any problems.

Avatar
andyle2k

25 May 2011 at 12:31pm Community Member, 1 Post

Hi,

I'm very new to the whole CMS stuff but I've been searching around and SilverStripe seems to be easiest one out there for what I require.

The thing that annoys me the most though is that the editor is not robust enough. I just want to do some simple text manipulation stuff such as changing the colour and size for certain words within a paragraph without changing the style completely.

Is there any way to do this?

I searched around and looked at the TinyMCE website and it looks as though the editor is quite full fledged and can do what I want so I was wondering whether it was possible to incorporate all these features or just the simple text manipulation features into SilverStripe.

Thanks a lot.

Avatar
smares

26 May 2011 at 1:14am Community Member, 25 Posts

One problem I have with the editor is the HTML view which you extended to support syntax highlighting. Apparently you are using a plugin which however is quite old and has some problem: being an IFrame, IE always moans when you try to paste content in the HTML view and asks if you want to allow access to the clipboard, on the other hand when pasting text from Word documents for example (especially with Firefox), not only the copied text is pasted, but also some Word markup. Additionally, text pasted from Word sometimes has the formatting maintained in the HTML editor (so when you paste a text that is centered and has a yellow markup for example, you'll see it centered and on a yellow background in the HTML source editor). What I did in my installation is to disable your syntax highlighting plugin and extend TinyMCE's default HTML editor with CodeMirror.

Avatar
zigojacko

2 February 2012 at 2:39am (Last edited: 2 February 2012 2:39am), Community Member, 2 Posts

Altering either HtmlEditorField.php and HtmlEditorConfig.php makes no difference to the TinyMCE buttons in the CMS for me.

Adding something such as HtmlEditorConfig::get('cms')->addButtonsToLine(1, 'hr,removeformat,visualaid'); for example, does work, but only for certain buttons.

I have literally tried to add an image button to TinyMCE via about 30 different approaches now and I'm getting extremely frustrated. I've just inherited the development of a client after another company have made alterations.

Can anyone kindly advise on the how the hell I'm suppose to make changes to TinyMCE please?

In the back office of clients site, version specifies Simple CMS 2.3.3

Thanks in advance

Avatar
Lucas

26 February 2012 at 1:12pm Community Member, 10 Posts

Have a look at [url=http://www.ssbits.com/tutorials/2009/customising-the-wysywig-editor-in-v2-3-2-tinymce/]what Aram says[/url]. I found this worked for me.

Also I was able to create a custom plugin, based on copying the example plugin (sapphire/thirdparty/tinymce/plugins/example), and modifying with examples found on the tinymce site, [url=http://www.tinymce.com/tryit/menu_button.php]here[/url]

Then I enabled my plugin and added it's button, using what Aram describes.

Good luck!

- Luke

Avatar
siannaDesttiny

2 March 2012 at 8:10pm Community Member, 1 Post

wonderful.

Go to Top