Trumbowyg: using trumbowyg with existing fontawesome or glyphicons icons

Created on 27 Oct 2014  ·  5Comments  ·  Source: Alex-D/Trumbowyg

Hi,

do you plan an option to use existing glyphicons or / and fontawesome icons? Would be a nice option if a project has already the icon set included, it would generalise the icons and strip down the included source.

Cheers

wontfix

Most helpful comment

I have created a Gist which makes the buttons use FontAwesome icons: https://gist.github.com/TonyVlcek/0de8cbb185b6cfd10b9333828615d469

All 5 comments

Hi!

If you do that, you just need customise the CSS as you want :)

I use png sprite and I don't want use fonts.

@Alex-D Can you expand on how to do this?

Since v2 : http://alex-d.github.io/Trumbowyg/documentation.html#svg-icons

You need to switch off SVG included feature by setting svgPath to false. Then, you can add your custom CSS based on button class. Each button has a class that follow this format:

[prefix]-[buttonFunction]-button
example: trumbowyg-strong-button

Go to your CSS and do what you want on this base :)

I have created a Gist which makes the buttons use FontAwesome icons: https://gist.github.com/TonyVlcek/0de8cbb185b6cfd10b9333828615d469

Example creating a button using fontawesome 4.7, to know wich code use on content, take a look into font-awesome.css and look for the icon you want

.trumbowyg-alert-button svg{
    display: none
}
.trumbowyg-alert-button:after {
    font-family: FontAwesome;
    content: "\f130";
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mur-wtag picture mur-wtag  ·  3Comments

Ydalb picture Ydalb  ·  3Comments

DirkOlten picture DirkOlten  ·  3Comments

mgjunk picture mgjunk  ·  4Comments

neerajjoshi picture neerajjoshi  ·  4Comments