Open bjazmoore opened 2 months ago
I found I can target these links using the Link "title" attribute, so this is not a super high priority need for me.
For those who want to use CSS and the "title" attribute to target a link for styling try the following:
`a[title="make_btn"] { / Basic button styling / display: inline-block; padding: 20px 80px; text-decoration: none !important; border-radius: 40px; / Large value for pill shape /
/ Color and text styling / background-color: royalblue; color: white !important; font-weight: bold;
/ Transition for smooth hover effect / transition: background-color 0.3s ease; }
a[title="make_btn"]:hover { / Lighter shade of blue on hover / background-color: navy; / Cornflower Blue, a lighter shade / }`
It looks like this:
There is still a problem with the approach shown above. The tooltip for the link says "make_btn" which is less than optimal.
So there is still a need to be able to add a class to style a link as a button.
Thanks
@bjazmoore - sounds like a good idea - I will add it in v.0.46.2 or in v.0.47
@bjazmoore - sounds like a good idea - I will add it in v.0.46.2 or in v.0.47
Thank you.
Hi,
Currently, you can use a small hack in the title field to speed up adding a class, but it can only be modified later through code:
my-title" class="my-class
The result is:
<a href="#" title="my-title" class="my-class">
A class field would be a great feature addition, as adding custom classes directly in the TinyMCE editor is a bit more tedious and less flexible.
Feature Description
It would be nice to be able to give a class to links that are added to a page or post through the Insert/Edit link dialog. This would allow some links to be styled if desired (perhaps as a button) in the post/page. Ideally it would be an extra field on the Insert/Edit link dialog: