FontAwesome icons in FAQ Body

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
wolfgtweb
Posts: 23
Joined: Thu Jun 10, 2021 6:15 pm

FontAwesome icons in FAQ Body

Post by wolfgtweb »

I am trying to figure out how to include FontAwesome Icons in the body of an FAQ topic. I see that FontAwesome was added way back in 2.8.0 (2013) and has been update a couple times to the latest version. I see that the icons throughout the site are from the fontawesome library. But I don't see a built in way to include fontawesome icons in the body (within the Tiny editor). Here are the things I have tried.

1. I have just tried to paste the code for the fontawesome icon in the body but it just displays the code like normal text.
2. I have tried to paste the Unicode string for the fontawesome icon in the body but again it just displays the code like text.
3. I have installed the josh18 fontawesome plugin. This is a rather old plugin and it hasn't been updated in a long time. But it is the only one I can find. I can get it to kind of work. The menu item is there and works properly and you can insert an icon. But, it does not display the icon in the editor. It just displays a box. When you save the edited FAQ, the icon does display when the FAQ is viewed (outside of the admin editor).

Any assistance to get the editor to display the icon properly? Or any way to just insert a fontawesome icon directly into the body?

Thank you for your assistance.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten »

Hi,

we don't use Font Awesome anymore, we switched to ForkAwesome with version 3.0: https://forkaweso.me/Fork-Awesome/

The integration can be found here: https://github.com/thorsten/phpMyFAQ/blob/main/phpmyfaq/assets/themes/default/scss/style.scss#L40

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wolfgtweb
Posts: 23
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb »

But how do you get the fonts (forkawesome icons) to show in an FAQ body? When you try to enter the code for the icon, it just writes out the code.
wolfgtweb
Posts: 23
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb »

Anyone have any thoughts on this? How to include a FontAwesome OR ForkAwesome icon in the body of an FAQ.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten »

Hi,

you can add e.g. this code

[code]<i class="fa fa-barcode" aria-hidden="true"></i>[/code]

in the source code editor and use the icons.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wolfgtweb
Posts: 23
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb »

When I bring up a blank "Edit Record", then click on "Source Code" and paste your example and click OK. The only thing that shows is "[code][/code]" in the body.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten »

Hi,

I'll check it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wolfgtweb
Posts: 23
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb »

Of the 3 open issues I have, this is the least important. We just resorted to snipping images and including them. But would be great just to be able to include FontAwesome (ForkAwesome) icons in the actual FAQ body. Let me know if this is something that will be possible.
Post Reply