Support for css icon fonts like fontello
In stackedit.io, I can display icons using css. For example, this: will display a folder icon.
Stackedit is simply using open source fonts available from http://fontello.com.
It would be nice if Marked could support css icon fonts as well.
Thanks,
/rb
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 04 Feb, 2014 02:41 AM
You can include any webfont and use it any way you like.
-Brett
2 Posted by rbondi on 04 Feb, 2014 02:53 AM
How?
I downloaded https://github.com/FortAwesome/Font-Awesome and added the font awesome.css file it in Marked's Preferences > Style > Custom Css, but the icons are not displaying in Marked.
Thanks,
/rb
Support Staff 3 Posted by Brett on 04 Feb, 2014 02:56 AM
FontAwesome uses classes to display fonts. While it's entirely possible
to do with a combination of Markdown and HTML, It's something well
beyond what I'm able to provide support for here.
-Brett
4 Posted by rbondi on 04 Feb, 2014 03:10 AM
OK, I found it:
Unfortunately, only the new css is used then. So when you select the new theme (which is named after the css file), the icons appear in Marked, but the rest of the text now looks like crap! :-(
What Marked needs is the ability to include a custom css file with all themes, or at least specific ones. That way, icons could be added to every or any theme.
FWIW, I tried this and it didn't work:
Didn't work. When I then selected "Custom Css Example" theme from the lower left menu, I saw little squares instead of the icons.
FWIW further references, which were not however helpful:
Support Staff 5 Posted by Brett on 04 Feb, 2014 03:13 AM
6 Posted by rbondi on 05 Feb, 2014 02:59 AM
ok..... 1 point for making me look as dumb as I deserve...
...but... ...zero additional points because, after I pasted in the contents of the font-awesome.css file there, instead of the icons showing up, I get the little square everywhere.
Question:
Where is the location of the file this "Additional CSS" is saved to? I need to put the font-awesome resources relative to it. (I tried grep-ing for some of its styles in Marked.app and ~/Library/Application Support/Marked, but didn't find anything.)
Thank you,
/rb :-)
Support Staff 7 Posted by Brett on 05 Feb, 2014 03:06 AM
Ah, yeah, that would be problematic. It's stored in Marked itself and
without a file location, so any references in it would have to be
altered to be absolute paths.
8 Posted by rbondi on 06 Feb, 2014 01:07 PM
OK, I can live with that, thanks.
Best,
/rb
9 Posted by rbondi on 16 Feb, 2014 08:45 AM
FWIW, that works great. For the faint-of-heart/non-techie users:
You're done. To test, put "<i class="icon-picture"></i>" into a markdown doc and view it with Marked. You should see a little folder icon.
Thank you Marked!
10 Posted by rbondi on 16 Feb, 2014 03:34 PM
Brett... Dude... I just installed Version 2.2 (823), and it wiped out all my custom css! You might want to fix that with another update soon....
11 Posted by rbondi on 16 Feb, 2014 03:36 PM
Hmm, it didn't wipe out the CSS, it's still there; but the font icons are no longer working. Marked is back to displaying empty squares instead of the font awesome icons. ??
Support Staff 12 Posted by Brett on 16 Feb, 2014 03:37 PM
Are you talking about the "Additional CSS" or your custom stylesheets?
Neither should have been wiped, but give me a better idea of what's
missing.
-Brett
13 Posted by rbondi on 02 Mar, 2014 06:52 PM
Can no longer reproduce, can be closed; thx, rb.
14 Posted by rozling on 27 May, 2014 03:21 PM
Hi rbondi, I'm looking to use Font Awesome in Marked too - am I understanding right that it's not possible any more using the method you outlined above?
15 Posted by rozling on 27 May, 2014 03:41 PM
nevermind - followed the instructions and got it working. Thanks rbondi and thanks Brett :D
rbondi closed this discussion on 04 Jul, 2014 11:59 AM.