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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

TinyMCE SSLink does not work in reduced config.


Go to End


1210 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);