5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1243 Views |
-
Remove Image and Flash Button from TinyMCE

24 May 2011 at 4:30am
Hi there,
does anyone know how to remove the 'Insert Image' and the 'Insert Flash' button from the HTML editor?
I tried HtmlEditorConfig::get('cms')->removeButtons('image') and HtmlEditorConfig::get('cms')->removeButtons('insertimage') but no success (even though it worked fine for several other buttons).
I have no idea at all how to adress the flash button. It is not mentioned on http://tinymce.moxiecode.com/tryit/full.php .
Thanks a lot for any Hint
SF
-
Re: Remove Image and Flash Button from TinyMCE

24 May 2011 at 4:49pm
try 'HtmlEditorConfig::get('cms')->removeButtons('ssimage')'
The following is one that I used for my last project. make sure it is insert in /mysite/_config.php
HtmlEditorConfig::get('cms')->setButtonsForLine(1, 'bold', 'italic', 'underline', 'strikethrough', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'styleselect', 'separator', 'bullist', 'numlist', 'charmap');
HtmlEditorConfig::get('cms')->setButtonsForLine(2, 'undo', 'redo', 'separator', 'cut', 'copy', 'paste', 'pastetext', 'pasteword', 'spellchecker', 'separator', 'ssimage', 'ssflash', 'sslink', 'unlink', 'anchor', 'advcode');
HtmlEditorConfig::get('cms')->setButtonsForLine(3, '');
HtmlEditorConfig::get('cms')->disablePlugins('table', 'contextmenu');in your case, you just nee to remove 'ssimage', and 'ssflash', just take them out from the list
HtmlEditorConfig::get('cms')->setButtonsForLine(1, 'bold', 'italic', 'underline', 'strikethrough', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'styleselect', 'separator', 'bullist', 'numlist', 'charmap');
HtmlEditorConfig::get('cms')->setButtonsForLine(2, 'undo', 'redo', 'separator', 'cut', 'copy', 'paste', 'pastetext', 'pasteword', 'spellchecker', 'separator', 'sslink', 'unlink', 'anchor', 'advcode');
HtmlEditorConfig::get('cms')->setButtonsForLine(3, '');
HtmlEditorConfig::get('cms')->disablePlugins('table', 'contextmenu'); -
Re: Remove Image and Flash Button from TinyMCE

24 May 2011 at 7:27pm
HtmlEditorConfig::get('cms')->removeButtons('ssimage', 'ssflash') did it.
Thanks a lot!
SF
-
Re: Remove Image and Flash Button from TinyMCE

12 January 2012 at 1:29am Last edited: 12 January 2012 1:29am
Hmmmm...
today, in Silverstripe V. 2.4.6.
HtmlEditorConfig::get('cms')->removeButtons('ssimage', 'ssflash')
has no effect any more.
Neither can I remove the buttons 'anchor' or 'tablecontrols' by this method. Others like 'pasteword' work like expected. All seems pretty strange.
Does anyone know if there were changes since 2.4.4?Regards
SF -
Re: Remove Image and Flash Button from TinyMCE

30 January 2012 at 3:11am
Please forgive me for refreshing the last post.
I did a lot of research and still have no chance to remove image, flash and anchor from tinymce in Silverstripe 2.4.6.
Anyone any hint?THX!
Regards
SF -
Re: Remove Image and Flash Button from TinyMCE

25 January 2013 at 11:41pm
I'm having the same problem, I can't remove anchor, image and code buttons from the HtmlEditor, neither I can move them into the first line.
How can we proceed?
thanksg4b0
| 1243 Views | ||
|
Page:
1
|
Go to Top |


