FontAwesome icons in FAQ Body

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

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

FontAwesome icons in FAQ Body

Post by wolfgtweb » Thu Jun 10, 2021 6:25 pm

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: 15215
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten » Tue Jun 15, 2021 2:56 pm

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: 19
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb » Wed Jun 30, 2021 8:16 pm

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: 19
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb » Wed Jul 07, 2021 2:22 pm

Anyone have any thoughts on this? How to include a FontAwesome OR ForkAwesome icon in the body of an FAQ.

Thorsten
Posts: 15215
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten » Wed Jul 07, 2021 2:24 pm

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: 19
Joined: Thu Jun 10, 2021 6:15 pm

Re: FontAwesome icons in FAQ Body

Post by wolfgtweb » Wed Jul 07, 2021 2:32 pm

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: 15215
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: FontAwesome icons in FAQ Body

Post by Thorsten » Wed Jul 07, 2021 3:40 pm

Hi,

I'll check it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply