How to fix TinyMCE to allow onclick in hyperlinks?

Posted: May 25, 2018 at 4:49 AM Quote #204836
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!
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
An upvote on a helpful post means "thank you" in every language. I believe in this community. For every question I ask, I try to answer at least five others.
Posted: May 25, 2018 at 5:04 AM Quote #204838
Hello Embryo,

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

Hope it will help you.

Thanks,
Jatin
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Thanks & Kind Regards
Jatin Gadhiya (Forefront Infotech)
Skype: jatin.gadhiya1

Visit out Official site for Plugins or Customization,
http://www.forefrontinfotech.com, http://www.nopcommerceplus.com
Email: [email protected], [email protected]
Posted: May 25, 2018 at 5:23 AM Quote #204841
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 post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
ima9ines.com - Let's contribute to the community :)

Kind Regards,
Tuấn Đỗ (ima9ines)

Skype support account - tuan_da2

FREE plugins
http://ima9ines.com/en/nopcommerce-plugins-free
http://www.nopcommerce.com/marketplace.aspx?vendor=61573
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.