@sergeyshadrin
Thanks a lot! The patch works perfectly for me, including translations (font plugin & Czech translation.)
There's just one minor issue: generated path of a plugin file contains double slashes, "/libraries/ckeditor5/font/40.2.0/dll//font.js
" in my case (using older CKE5 version because I'm holding Drupal update due to an unrelated bug.) It seems the issue is in the "src/Utility/LibraryDefinitionItem.php" file, addLocalJs()
method: it generates the path as "{$this->baseDirectory}/{$name}.js
" which seems to introduce the second slash.
Sorry for the late reply - I don't have much time during workdays.
I can confirm it works for me as well.
Thanks a lot for your answer and support!
@salmonek
I see, that makes sense. I guess the Drupal core is the only module which can afford to provide plugin library.
Thanks a lot in advance and thanks for this module itself, it's really lifesaving!
Inaetaru → created an issue.
Same issue for font color plugin ("Font Color", "Font Background Color", and "Document colors" strings) with Czech language.
Additionally, when I tried to translate them myself via the /admin/config/regional/translate, these strings were not found.
👆 This would append that one additional option and have no UI at all.
This part:
- { model: 'custom_heading', title: 'Custom Heading', view: { model: 'div', class: 'custom-heading-class'}, 'ck-heading_custom-heading' }
doesn't seem to work for me. It somehow breaks the CKEditor (toolbar is visible, but text editing part is not. JS console prints "CKEditorError: e is undefined")
I managed to fix it with:
- { model: 'custom_heading', title: 'Custom Heading', view: { name: 'div', classes: [ 'custom-heading-class' ] }, class: 'ck-heading_custom-heading' }
Also changed the
- <div class="custom-heading-class'">
to
- <div class="custom-heading-class">
(removed the ' character.)
So leaving this comment just in case someone else tries to use the example, because it's nice starting point.