FortAwesome does not render in headings

FortAwesome does not render in headings

deur Visvanath Ratnaweera -
Getal antwoorde: 9
Prentjie van Particularly helpful Moodlers Prentjie van Translators
Moodle 3.5.6+ (Build: 20190614) Theme Classic theme_classic_moodle35_2018082000 and Boost 2018051400 (default in the core) As the various screen-shots demonstrate, FontAwesome renders in content but not in headings. Is it possible to get them also in the headings?

Aanhangsel farendering-collage.png
Gemiddeld van beoordelings: -
In antwoord op Visvanath Ratnaweera

Re: FortAwesome does not render in headings

deur Gareth J Barnard -
Prentjie van Core developers Prentjie van Particularly helpful Moodlers Prentjie van Plugin developers
That's not a core filter. So how can we reproduce if we don't know what it is?
Gemiddeld van beoordelings: -
In antwoord op Visvanath Ratnaweera

Re: FortAwesome does not render in headings

deur Adrian Perez Rodriguez -

On our platform it is working as expected, also with the less than character entity. Do you have the filter enabled in the "Course administration > Filter"?

Greets,
Adrian

Aanhangsel Fontawesome-as-heading.png
Gemiddeld van beoordelings: -
In antwoord op Adrian Perez Rodriguez

Re: FortAwesome does not render in headings

deur Visvanath Ratnaweera -
Prentjie van Particularly helpful Moodlers Prentjie van Translators
Hi Adrian

Thanks a lot for the quick response! Under Site administration > Plugins > Filters > Manage filters > FontAwesome is set to Content and headings. Screen-shot attached.

I changed "Convert URLs into links and images" to Content (only) as a test. Didn't help.
Aanhangsel activefilter.png
Gemiddeld van beoordelings: -
In antwoord op Visvanath Ratnaweera

Re: FortAwesome does not render in headings

deur Adrian Perez Rodriguez -
These are the general settings, and they look correct. Only that we have at the "Convert URLs into links and images" set on "Content". But nevertheless, you must have enabled this filter in your course as well. Please check that.
Gemiddeld van beoordelings: -
In antwoord op Adrian Perez Rodriguez

Re: FortAwesome does not render in headings

deur Visvanath Ratnaweera -
Prentjie van Particularly helpful Moodlers Prentjie van Translators
Yes, at course level it is the default. See screen-shot.

About "Convert URLs into links and images", as I already mentioned, 'I changed "Convert URLs into links and images" to Content (only) as a test. Didn't help.'
Aanhangsel filtersettingscourse.png
Gemiddeld van beoordelings: -
In antwoord op Visvanath Ratnaweera

Re: FortAwesome does not render in headings

deur Visvanath Ratnaweera -
Prentjie van Particularly helpful Moodlers Prentjie van Translators
Found another missing piece: Site administration > Appearance > HTML settings > Remove HTML tags from all activity names (formatstringstriptag) was set, which was the default. Unticked and now FA icons also appear in headings.

It is still not satisfactory. Somehow the icon in the heading is "backspaced". See pic.
Aanhangsel twitter2.png
Gemiddeld van beoordelings:Useful (1)
In antwoord op Visvanath Ratnaweera

Re: FortAwesome does not render in headings

deur Adrian Perez Rodriguez -
Hello Visvanath

Thanks for your findings, you're absolutely right. I updated the documentation in the Moodle plugins repository.

The other problem is as I see, only when you are _not_ in edit mode. The difference is, that in edit mode the activityinstance-inner is wrapped in an <span> element. Without an own hack (probably CSS) or changes in Moodle core we can not offer you another solution.

Edit.
As I see it's because of these lines in Moodle core:
.section .activity .contentwithoutlink>a, .section .activity .activityinstance>a {
    display: block;
    text-indent: -31px;
    padding-left: 31px;
}

Unset both values would solve the problem. But I don't know why these CSS values are applied. It seems to me that it doesn't make a difference.

HTH,
Adrian
Gemiddeld van beoordelings:Useful (1)
In antwoord op Adrian Perez Rodriguez

Re: FortAwesome does not render in headings

deur Visvanath Ratnaweera -
Prentjie van Particularly helpful Moodlers Prentjie van Translators
OK. For the others who are following, the activity name is properly formatted in edit mode. (Pic. attached).
Aanhangsel twitter2editmode.png
Gemiddeld van beoordelings: -