Hi!
Currently the fontawesome icons do not appear in CKeditor. CKeditor in Drupal 8 provides an API. Modules can have their CSS loaded in CKeditor by using the function hook_ckeditor_css_alter().

This feature request is asking that this function be added to this module to load the Fontawsome CSS so that the Fontawesome icon show in the CKeditor.

Thanks for your consideration of this feature!
Frederick

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frederickjh created an issue. See original summary.

Daniel.Moberly’s picture

Attaching patch which should resolve this issue

  • Daniel.Moberly committed 979b9ac on 8.x-1.x
    Issue #2857226 by Daniel.Moberly: Add function hook_ckeditor_css_alter...

  • Daniel.Moberly committed d6b709f on 8.x-1.x
    Issue #2857226 by Daniel.Moberly: Add function hook_ckeditor_css_alter...
Daniel.Moberly’s picture

Status: Active » Needs review
frederickjh’s picture

@Daniel.Moberly I was trying to test this patch on simplytest.me and the patch does not apply correctly to the 8.x-1.x-dev version that this issue is filed under. It applies to the 8.x-1.2 but it appears that there is debug code on line 37 that prevents me from creating content.

Please remove the debug code and resubmit the patch. When testing on simplytest.me I could not create content. I got the error: "Fatal error: Call to undefined function dpm() in /home/duhzo/www/sites/default/modules/fontawesome/fontawesome.module on line 58"

Daniel.Moberly’s picture

frederickjh,

Can you update to the latest dev version? The newest version should already have this patch applied for testing (and the forgotten dpm() function call removed)

Let me know if you have issues

frederickjh’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
35.94 KB

Sorry @Daniel.Moberly somehow I missed that the code had been committed to the dev branch already. That would explain why the patch was not applying, since it was already in the code.

I tested the last patch as it is in the dev branch and it works fine.

I did notice something that I am not sure if your commit cause this or others. The Fontawesome icons showed even with the Libraries module uninstalled and the Use CDN version of Font Awesome? unchecked.

Maybe there is code that falls back to the CDN version if the Libraries module is not installed.

In any case it is good to see this working. Now we need a production release of this module, as there have been lots of changes since February 2017 when the last production release came out.

Thanks for your time and work on this!
Frederick

Daniel.Moberly’s picture

Status: Reviewed & tested by the community » Fixed

Frederickjh,

The Drupal 8 version of FontAwesome doesn't depend on the Libraries module. As long as you have your Font Awesome library in the correct location (/libraries), the module should work!

Thanks for testing. We have a few other issues to resolve before we push a production release. Hopefully soon!

Daniel.Moberly’s picture

Released in 8.x-1.3

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.