5411 Posts in 1648 Topics by 1187 members
|Go to End|
19 January 2009 at 12:04pm
I have been reading some previous forum threads about the customising of TinyMCE and basically i have built a custom button for tiny MCE but cannot get it running what so ever.
What i have done so far is :
Created a new class /mysite/code/alternatetoolbar.php this contains a customised buttons function that returns all the buttons AND my custom button.
Edited /cms/code/leftandmain.php changed EditorToolbar function from 'return new HtmlEditorField_Toolbar($this, "EditorToolbar");' TO 'return Object::create('HtmlEditorField_Toolbar', $this, 'EditorToolbar');'
Added 'Object::useCustomClass('HtmlEditorField_Toolbar', 'AlternateToolbar');' to /mysite/_config.php
Added my plugin to the /jsparty/tiny_mce2/plugins directory
Added button image to /jsparty/tiny_mce2/themes/advanced/images
But absolutely nothing appears in the application!!!!
I tried editing the 'HtmlEditorField_Toolbar' and adding the button and whilst this added the button, the button did nothing when pressed!
If anyone can help please let me know.
10 February 2009 at 5:32pm
Which version of SilverStripe are you using? This becomes easier in 2.3 ...
11 February 2009 at 8:44am
Using 2.23 I got it working in the end but i had to edit the 'HtmlEditorField_Toolbar' instead of using my own function.
|Go to Top|