Replace CKEditor toolbar images with font awesome icons -


is there way replace default toolbar images (e.g. bold, italic, etc.) font awesome icons?

i know old issue, on plugin plugin basis i've been able add font-awesome icons ckeditor buttons following code inside plugin's init function. in case plugin called trim:

//set button name , fontawesome icon var button_name = 'trim'; var icon = 'fa-scissors';  //when ckeditor plugin in created, find button //in current instance , add fontawesome icon ckeditor.on("instanceready", function(event) {   var this_instance = document.getelementbyid(event.editor.id + '_toolbox');   var this_button = this_instance.queryselector('.cke_button__' + button_name + '_icon');   if(typeof this_button != 'undefined') {     this_button.innerhtml = '<i class="fa ' + icon + '" style="font: normal normal normal 14px/1 fontawesome !important;"></i>';   } }); 

it hinges on knowing class of span inside button, might not convenient works.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -