20 lines
547 B
PHP
20 lines
547 B
PHP
<?php
|
|
|
|
/**
|
|
* Implements hook_civicrm_coreResourceList().
|
|
*/
|
|
function ckeditor5_sos_demo_civicrm_coreResourceList(&$items, $region) {
|
|
if ($region !== 'html-header') {
|
|
return;
|
|
}
|
|
|
|
$editorId = Civi::settings()->get('editor_id');
|
|
if (!in_array($editorId, ['CKEditor5-elfinder', 'CKEditor5-base64'], TRUE)) {
|
|
return;
|
|
}
|
|
|
|
Civi::resources()
|
|
->addStyleFile('one.jonathandhn.ckeditor5sos', 'fonts/roboto/index.css', 20, 'html-header')
|
|
->addScriptFile('one.jonathandhn.ckeditor5sos', 'js/editor-config.js', 20, 'html-header');
|
|
}
|