Page 1 of 1

Font Awesome and MicroTiny

Posted: Thu May 07, 2015 7:50 am
by wmdvanzyl
Font Awesome uses an element <i> to insert icons into pages. However, i find that MicrTiny strips these out when using WYSIWYG

Is there a way to add the <i> to the MicroTiny set of accepted tags? Or is there a work-around - perhaps a tag or UDT?

Example:
<i class="fa fa-camera-retro"></i>
I suppsoe you could do:
{icon class="fa fa-camera-retro"}
Something like that?

First prize would still be just having the WYSIWYG editor not strip out the tags.

Re: Font Awesome and MicroTiny

Posted: Thu May 07, 2015 11:50 am
by velden
UDT would be very simple:


name: 'icon'
usage: {icon class="fa fa-camera-retro"}

Code: Select all

echo '<i class="' . $params['class'] .'"></i>';

Re: Font Awesome and MicroTiny

Posted: Fri May 08, 2015 8:31 am
by wmdvanzyl
Agreed.

So for future reference, there is no way to customize MicroTiny tags?
What about TinyMCE?

Re: Font Awesome and MicroTiny

Posted: Fri May 08, 2015 2:33 pm
by JohnnyB
Font awesome uses < i > but you don't have to. You can use any element that can be assigned as inline-block in CSS. Personally, I don't use <i> at all with FA. Instead I use either a span, or an a or another element that makes sense for the site that I'm working with at the time.

Re: Font Awesome and MicroTiny

Posted: Sat May 09, 2015 7:01 am
by wmdvanzyl
JohnnyB wrote:You can use any element that can be assigned as inline-block in CSS. ...use either a span, or an a or another element that makes sense for the site...
Didn't know that - thanks. I suppose just reverting to using the <span> element is more semantically correct anyway.