Font Awesome in CK Editor

22 views
Skip to first unread message

Rob Costain

unread,
Sep 4, 2024, 10:48:26 AM9/4/24
to Sakai Users Group
Good morning!

We are running Sakai 22.1 with online classes of high school students.

In our old install of Sakai 11, the instructors were used to having a Font Awesome button the CKEditor.

We're having trouble figuring out how to add/enable it in the current version.

Can someone point me to a step-by-step to help us make it happen?

Thanks,

--
ROBERT COSTAIN
Learning Technology Manager, LEARN
201-4190, rue Garand, Laval, QC H7L 5Z6
Tel : 450.622.2212 x222 | Mobile: 514.605.0844 | Fax: 450.622.1460
www.learnquebec.ca
Facebook LogoLinkedIn LogoTwitter LogoInstagram Logo

Sam Ottenhoff

unread,
Sep 4, 2024, 10:50:59 AM9/4/24
to Rob Costain, Sakai Users Group
I believe this is the relevant add-on: https://ckeditor.com/cke4/addon/ckawesome


--
You received this message because you are subscribed to the Google Groups "Sakai Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-user+...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/sakai-user/CALzwOesB-CDbdi3hrJxdRkXDwA8oMP%3DbBoM5Df5QrUy_W2hD8w%40mail.gmail.com.

Austin

unread,
Sep 4, 2024, 2:14:16 PM9/4/24
to Sakai Users Group
ckeditor wasn't working for us in Sakai 22, there was an error:

Uncaught TypeError: a.charAt is not a function

so we switched to


Note - for that plug-in we also had to apply a patch to it as described in that plug-in's comments, "if(typeof ids !== "undefined")"

var faIcons='';
for(var x in allFaIcons){
    var ids = allFaIcons[x].id;
    if(typeof ids !== "undefined") {
        var id = ids.split('-').join('<br/>');
        faIcons += '<a href="#" onclick="klick(this);return false;" title="'+ids+'"><span class="fa fa-'+ids+'"></span>'+id+'</a>';
    }
}

to install it:

1. download the plugin
2. add it to /library/src/webapp/editor/cextraplugins/ckeditorfa
3. edit /library/src/webapp-filtered/editor/ckeditor.launch.js and add the following

extraPlugins: [
            //These plugins are included in the ckeditor4 webjar
            // 'a11yhelp',
            'about',
            // 'adobeair',
            .
            .
            .
            .
            (sakai.editor.enableSakaiOpenLink ? 'sakaiopenlink' : ''),
            `${ckeditor-extra-plugins}`,
            `${ckeditor-a11y-extra-plugins}`,
            `${ckeditor-math-extra-plugins}`,
            'ckeditorfa'
        ].join(','),

.
.
.
       [ 'AudioRecorder', 'Image', 'Html5video','Table','HorizontalRule','Smiley','SpecialChar','ckeditorfa'],
.
.
.
CKEDITOR.plugins.addExternal('a11ychecker',webJars+'a11ychecker/${ckeditor.a11ychecker.version}/', 'plugin.js');
// FMathEditor plugin
CKEDITOR.plugins.addExternal('FMathEditor', fmathPath, 'plugin.js');
CKEDITOR.plugins.addExternal('pasteFromGoogleDoc',webJars+'pasteFromGoogleDoc/${ckeditor.pasteFromGoogleDoc.version}/', 'plugin.js');
CKEDITOR.plugins.addExternal('ckeditorfa',basePath+'ckeditorfa/', 'plugin.js');


Reply all
Reply to author
Forward
0 new messages