Add SOS CKEditor configuration demo

This commit is contained in:
jonathandhn committed 2026-09-17 13:26:30 +02:00
commit f92a1cd866
25 files changed
+970

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<?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');
}