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:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Adding onlick attribute for TinyMCE

Go to End



Community Member, 181 Posts

8 July 2009 at 1:47pm

So, I've figured out where the config for tinyMCE is in 2.3.2 and see that iframe has been added as standard, thank you.

Now I would like to add support for the onclick attribute, specifically for the <li> tag so have put this in mysite/_config.php

HtmlEditorConfig::get('cms')->setOptions(array('extended_valid_elements' => 'li[style|id|onclick|title|class]'));

but this doesn't seem to work. Am I on the right lines? I'd rather not edit LeftAndMain.php