How to fix TinyMCE to allow onclick in hyperlinks?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi-

I know it isn't possible to add scripts to the content area of a TinyMCE editor, but I just need to use an onclick event in a hyperlink in the body of a topic page to open a custom menu, like:
<a href="#" onclick="BootSideMenu()">This is the link</a>


The onclick disappears whenever I go from Source Code view back to normal view as if it were a script.
Is there any way to prevent this?

Thanks!
5 years ago
Hello Embryo,

Look at this http://fiddle.tinymce.com/mAdaab/1

Hope it will help you.

Thanks,
Jatin
5 years ago
embryo wrote:
Hi-

I know it isn't possible to add scripts to the content area of a TinyMCE editor, but I just need to use an onclick event in a hyperlink in the body of a topic page to open a custom menu, like:
<a href="#" onclick="BootSideMenu()">This is the link</a>


The onclick disappears whenever I go from Source Code view back to normal view as if it were a script.
Is there any way to prevent this?

Thanks!


You should change following setting to True
adminareasettings.richeditorallowjavascript
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.