question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

html in customButtons

See original GitHub issue

While creating a custom button, how do I use FontAwesome icons as button text? I have tried customButtons: { syncbtn: { text: '<i class="fa fa-glide"></i>' } }, But this shows the text as it is and doesn’t convert it to a glyph.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:9
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
MartijnWelkercommented, Aug 22, 2016

Hi @arpitgogia, questions like these should usually be posted at stackOverflow, to use Font-Awesome icons in your buttons you could do the following:

customButtons: { 
    syncbtn: { 
       icon: 'fa fa fa-glide'
    }
}

And in your CSS you should add the following:

.fc-icon-fa {
  font-family: FontAwesome;
}

It’s a bit of a hack, because FullCalendar automatically prepends the first icon class with fc-icon-.

5reactions
Phibedycommented, May 13, 2019

Adding custom html to buttons would also help if you use react, because you could render the button icons as svg and don’t have to load the complete fontAwesome file 👍

Hack: Just add a custom button. Afterwards set the svg manually using js in componentDidUpdate:

document.querySelector(".fc-<customButtonName>-button").innerHTML=`<svg ....
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a form with custom buttons in HTML
There are two ways to create custom buttons with PUSH button in HTML document. Method 1: Using text as a push button.
Read more >
Make Custom Buttons in HTML and CSS - YouTube
How to make your own customized hyperlink buttons for web pages in HTML and CSS.Source code is available at: ...
Read more >
CSS Buttons - W3Schools
Learn how to style buttons using CSS. Basic Button Styling. Default Button CSS Button. Example .button { background-color ...
Read more >
how to use custom buttons in html forms - Stack Overflow
You can override or customise the default button using css. You can apply the css by using class name or id or default...
Read more >
How to: create custom HTML links/buttons - Inline Manual
Read more about adding custom buttons here. However, it's also possible to add custom links/buttons with HTML. You'll be able to add your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found