-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Font Awesome 5 icons #593
Comments
Doesn't the webfont way work? Seems like the markup is pretty much the same. |
They change font name. Instead of |
Another point: icon prefixes have been changed. instead of "fa" now "far" and "fas" are used: |
Ok, thanks for pointing this out. This will require some changes to get working. |
@UncleHobbot I needed to update these quickly to FA 5 Light to match my site's style, so I just updated the Updated jquery.contextMenu.css:
|
You Should be able to extract that to a seperate css file even, which might be better for you to do. You can make sure this one sticks, either by adding a class/element so it is more specific, or loading in the right order. |
I came up with a starting point for you to work with. I tested it with the built in icons, Font Awesome 4 and 5, both the svg version and the web font version. FA5 fonts need to be put in their own element. If in svg script mode, the element could be consumed. in the classNames object, I added itemText: 'context-menu-text' and used it here:
that allows these classes to work:
Then the icon section:
I tested it with:
Hope this helps, |
…>` element when font-awesome 5 classes are detected. This also enabled creating a new element as return value for the `icon` callback for extra flexibility. Relates to issue #593
…>` element when font-awesome 5 classes are detected. This also enabled creating a new element as return value for the `icon` callback for extra flexibility. Relates to issue #593
I've added support font fontawesome in this branch. When using the Font Awesome 5 classes (like Perhaps some of you can test if this change works for you? |
Hi, I just updated contextMenu plugin with new FontAwesome 5 support. It's working properly if you use FontAvesome with WebFonts & CSS, but if you use FontAwesome with SVG & JS, icons are not rendered properly. In this case you need additional css:
|
Thanks die checking it out. I'll add the proper rules for svg's also. |
I've pushed an update to the branch with some extra styling for the SVG's, the extra space at the top was needed for the other icons also. |
Thank you for quick fix. |
The branch has been merged to master. |
ContextMenu plugin doesn't work with the new Font Awesome 5
The text was updated successfully, but these errors were encountered: