Font Awesome and MicroTiny

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Font Awesome and MicroTiny

Post 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.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Font Awesome and MicroTiny

Post 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>';
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Font Awesome and MicroTiny

Post by wmdvanzyl »

Agreed.

So for future reference, there is no way to customize MicroTiny tags?
What about TinyMCE?
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Font Awesome and MicroTiny

Post 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.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Font Awesome and MicroTiny

Post 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.
Post Reply

Return to “The Lounge”