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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

TinyMCE SSLink does not work in reduced config.


Go to End


1031 Views

Avatar
dacar

Community Member, 173 Posts

18 May 2011 at 10:00pm

Hi, i am trying to configure the TinyMCE Editor. But if i use the "sslink" button, i will get an javascript error:

An error occurred. Please try again, or reload the CMS if the problem persits.
Error details: Result of expression 'undefined' is not a function.

The anchor is insert after the prompt and the code looks like this: <a href="javascript:mctmp(0);">Hauses</a>

Can anybody help?

HtmlEditorConfig::get('reduced')->setOptions(array(
	'friendly_name' => 'reduced',
	'priority' => '50',
	'mode' => 'none',
	'language' => i18n::get_tinymce_lang(),
	'content_css' => '../themes/xyz/css/editor.css',
	'body_class' => 'mceContentBody'
));
HtmlEditorConfig::get('reduced')->enablePlugins(array('ssbuttons' => '../../../cms/javascript/tinymce_ssbuttons/editor_plugin_src.js')); 

HtmlEditorConfig::get('reduced')->disablePlugins('table');
HtmlEditorConfig::get('reduced')->setButtonsForLine(1,
   									'save','bold','separator',
									'cut','copy','paste','pastetext','pasteword','separator','bullist','numlist','separator',
									'sslink','unlink','anchor','separator',
									'cleanup','removeformat','separator',
									'charmap'
);
HtmlEditorConfig::get('reduced')->setButtonsForLine(2);
HtmlEditorConfig::get('reduced')->setButtonsForLine(3);