Filters: FontAwesome icons

filter_fontawesome
Maintained by Picture of FFHS (Fernfachhochschule Schweiz)FFHS (Fernfachhochschule Schweiz), Picture of Adrian Perez RodriguezAdrian Perez Rodriguez, Picture of Christoph KarlenChristoph Karlen, Picture of Sascha VogelSascha Vogel
This filter allows you to use fontawesome icons in the Moodle text editor without worrying about the HTML syntax.
1507 sites
605 downloads
62 fans
Current versions available: 8

Moodle FontAwesome Filter Build Status Coverage Status

Introduction

This filter allows you to use fontawesome icons in the Moodle text editor without worrying about having your div's stripped out by the Moodle Atto/TinyMCE HTML cleaner.

This plugin supports the legacy FontAwesome 4 icon set and the newer version 5.

Furthermore it's important to know, that this plugin doesn't supply the newer free FontAwesome 5 icon set.  This is the responsibility of Moodle or your theme developer. So it can be, that not all FA icons will be displayed, for more information consult these links:

Requirements

Your site/theme must have FontAwesome embedded already. This filter does not provide the font.

  • Moodle 3.3 upwards

Installation

Install the plugin like any other plugin to folder filter/fontawesome

Use git to install this plugin:

cd /var/www/html/moodle
git clone https://github.com/adpe/moodle-filter_fontawesome.git filter/fontawesome


Then complete upgrade over CLI:

sudo -u apache /usr/bin/php admin/cli/upgrade.php

or GUI.

See MoodleDocs] for details on installing Moodle plugins

Configuration

First, activate the filter_tabs plugin in Site Administration -> Plugins -> Filters -> Manage filters

Additional

filter_fontawesome has a settings page to allow you to limit the filter to only certain text-box formats.

Usage

To create FontAwesome icons in text fields, use the following syntax: [fa-*] where * is the name of the icon you wish to display.

First you will need to find the icon you wish to use. This list provides a full overview.

Some examples and guide to start:

  • Anywhere you wish to add an icon just surround it with square brackets and type in the icon name. e.g.: [fa-camera-retro]
  • If the icon name is a brand, please add fab at the beginning of the square brackets.
  • If you wish to make the icon larger you can use a multiplier. e.g.: [fa-camera-retro fa-2x] or [fa-camera-retro fa-4x]
  • If you wish to rotate the icon you can specify how many degrees clockwise. e.g.: [fa-camera-retro fa-rotate-90]
  • You can also flip an icon horizontally or vertically. e.g.: [fa-camera-retro fa-flip-horizontal] or [fa-camera-retro fa-flip-vertical]
  • You can mute the colour to a dull grey. e.g.: [fa-camera-retro fa-muted]
  • You can "pull" the icon to the left or right. If it is "pulled" to the left text will wrap to the right. e.g.: [fa-camera-retro pull-left]
  • All the settings above can be mixed and matched e.g.: [fa-quote-left fa-4x pull-left fa-muted]

Further information

License

Screenshots

Screenshot #0
Screenshot #1

Contributors

Picture of FFHS (Fernfachhochschule Schweiz)
FFHS (Fernfachhochschule Schweiz) (Lead maintainer)
Picture of Adrian Perez Rodriguez
Adrian Perez Rodriguez: Developer
Picture of Christoph Karlen
Christoph Karlen: Developer
Picture of Sascha Vogel
Sascha Vogel: Developer
Julian Ridden
Julian Ridden: Original author
Picture of Usman Asar
Usman Asar: Previous maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • MD shot of me from his iphone4
    Fri, Oct 18, 2013, 2:45 PM
    I'm speechless, thanks for sharing this!
  • Picture of Christian Conradi
    Tue, Dec 3, 2013, 2:40 AM
    We have problems with this Filter in moodle 2.5.1! It doesn't work. The theme was out of order! Must i have moodle 2.6?
  • Picture of Heinz Schmolke
    Fri, Dec 27, 2013, 3:49 AM
    The same with me: If I put the directory in filters I got a error: "Trying to reference an unknown block region side-post". The filter do not work in 2.5
  • Picture of Caitlin Cahill
    Thu, May 15, 2014, 5:04 AM
    Great filter! It works beautifully on webpages, but does not work on a database template.
  • Work Photo 2014
    Fri, Nov 28, 2014, 12:05 AM
    Brilliant idea... I see the latest download is for 2.6 does it work with 2.7 and 2.8?
  • Picture of David Mudrák
    Wed, Dec 10, 2014, 4:30 AM
    This unmaintained plugin has been adopted by Usman Asar. Thanks a lot, and good luck with further development of it!
  • Picture of Chris Mat
    Wed, May 27, 2015, 4:39 PM
    Hi Usman,

    Are you going to upgrade to 2.9?
  • Picture of Usman Asar
    Wed, May 27, 2015, 5:25 PM
    Chris, usually filters are compatible across all Moodle versions without any dependencies. Thanks for the reminder (should have done it long ago), Moodle version updated for compatibility.
  • Picture of Brendan Heywood
    Thu, Aug 20, 2015, 11:33 AM
    hi Usman,

    Can you please share the latest git repo in the plugin metadata, it is out of sync with the zip downloads, thanks smile
  • Ricardo Caiado
    Wed, Apr 13, 2016, 8:53 PM
    Hi,

    Got this log error message when I try to upgrade to v4.6:

    "...PHP Notice: Invalid get_string() identifier: 'configrequiremodintro' or component 'admin'. Perhaps you are missing $string['configrequiremodintro'] = ''; in lang/en/admin.php?
    • line 349 of /lib/classes/string_manager_standard.php: call to debugging()
    • line 6675 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    • line 36 of /mod/grouptool/settings.php: call to get_string()
    • line 89 of /lib/classes/plugininfo/mod.php: call to include()
    • line 45 of /admin/settings/plugins.php: call to core\\plugininfo\\mod->load_settings()
    • line 6933 of /lib/adminlib.php: call to require()
    • line 784 of /admin/index.php: call to admin_get_root()
    in XXXXX/lib/weblib.php on line 2934, referer: http://XXXXX/admin/plugins.php"

    Any ideas?

    Ricardo
Please login to post comments