craftcms / ckeditor

Edit rich text content in Craft CMS using CKEditor.
https://plugins.craftcms.com/ckeditor
GNU General Public License v3.0
46 stars 23 forks source link

Documentation about DDL incorrect? #281

Closed mattfordham closed 1 week ago

mattfordham commented 3 weeks ago

Description

In attempting to get the Clipboard plugin working, I've been following the documentation about "Adding CKEditor Plugins". The documentation states the following....

If you’re including one of CKEditor’s first-party packages, it will already include a build directory with a DLL-compatible package inside it.

Unless I am misunderstanding something, I have not found this not to be true. For example, the Clipboard plugin is here, and only contains a "src" directory:

https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-clipboard

Am I misunderstanding, or has something changed?

Steps to reproduce

N/A

Additional info

N/A

mattfordham commented 3 weeks ago

After a bit more digging on the matter, it seems the documentation here is not "incorrect", just out of date, as the DDL builds have been deprecated:

https://ckeditor.com/docs/ckeditor5/latest/getting-started/legacy/advanced/alternative-setups/dll-builds.html

ryanirelan commented 2 weeks ago

After a bit more digging on the matter, it seems the documentation here is not "incorrect", just out of date, as the DDL builds have been deprecated:

https://ckeditor.com/docs/ckeditor5/latest/getting-started/legacy/advanced/alternative-setups/dll-builds.html

AFAIK, you still need a DLL-compatible file to add a plugin to the Craft CMS CKEditor because we're not rebuilding the CKEditor just linking the plugin code.

i-just commented 1 week ago

Hi, thanks for reaching out!

The short answer is yes, you still need a DLL-compatible file(s).

The longer answer is: We are aware of the changes to the installation methods and are working on migrating away from DLLs. The change was introduced in CKEditor 5 v42.0.0. As per the documentation, the DLLs are deprecated but should still be supported until the end of 2025.

You will not find the build directory if you look in the CKEditor’s repo, but here’s a good explanation of how to get it: https://github.com/craftcms/ckeditor/issues/119#issuecomment-1651513615. The only thing I’d add is that Craft’s CKEditor plugin currently uses v41.0.0, so you might want to start with v41 of the plugin you’re after (for example, to get a specific version of the highlight plugin, you could use npm pack @ckeditor/ckeditor5-highlight@41.0.0).

I hope this helps!

I’ll close this now, but feel free to reach out if anything’s unclear.