How to Properly add "javascript:openCalendar" to href in a link?
-
As going from Text to Visual editing causes TinyMce to strip code
a href="openCalendar('DateIn')"....
from a link that opens a datepicker window., I looking for a way to prevent this. I can’t take the chance the code will be stripped out when the file is being edited by others.I’ve read that the proper way to do this is to either use a plugin that prevents the stripping, enqueue it or create a shortcode, or create a class…?
As the plugins mentioned don’t look up to date, I’m hoping for a simple explanation on how to use the enqueue, shortcode or class. I have a functions.php in my child theme, but have no idea what code would go where and what the link would look like. Thank you for this info.
- The topic ‘How to Properly add "javascript:openCalendar" to href in a link?’ is closed to new replies.