Reputation: 1174
I have searched around but wasn't able to find a solution.
What I want to find out is a way to edit the tinyMce link plugin (or make an edited copy of it) to work in a way that adds specific styling within the link tag, and the ability to specify in the initialization of the plugin what style to add, so that it can be done dynamically. So that I can have result like this(for example):
<a style="color:#00FFFF" href="www.google.com">Google</a>
Any solutions for this? Or a point in the best general direction?
Thanks
Upvotes: 1
Views: 1393
Reputation: 50832
In this case i think the best is to wait until the link has been inserted and then do the following action assuming your color has been set in the tinymce init like my_link_color: 'green',
$(ed.getBody()).find('a').attr('style','color:'+ed.getParam("my_link_color"));
Upvotes: 2