I'm attempting to automatically add a class to all links created when clicking the "link" button in tinyMCE. I've found this snippet in the tinyMCE docs:
// Adds a class to all paragraphs in the active editor tinyMCE.activeEditor.dom.addClass( tinyMCE.activeEditor.dom.select('p'), 'myclass' );
I think this will be what I need if I change it to apply to anchors.
Do you think this will work? Do you know of a better way to do it?
How and where do I add this snippet to my theme?
The theme I'm using has a
tinyMCE folder in the