You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#116540 issue setting a link on font awesome icon

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 28 March 2024 13:18 GMT

zetcom
First of all, thank you for adding the fontawesome plugin! Great, I love it! :D

Inserting fontawesome icons works fine. However, there is a problem with adding links to those icons.
Unfortunately, adding a link is not possible in the "editor view" of JCE.
You can set a link in the "code view" and it will remain when you save - but only if the article is saved from the "code view".
If you switch to the editor view and click save, JCE removes the link from the icon.

It looks like the code is being cleaned up and <a> tags are not allowed on <span> tags.
Is there a setting somewhere that prevents this?

Ryan
In order to improve selection of icons, and cursor placement around them, I changed from using a <span> tag for the icons in the editor to an anchor tag <a>. The <a> tag would then be converted to a <span> when the content was saved.

This works really well, except I forgot about the possibility of creating a link on an icon, and nested <a> tags are not supported!

I'm having another look at this, and will probably revert to using <span> tags in all instances. I'll keep you posted.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.