<p>The GitHub repository for CKEditor plugins doesn't include the bundled package, just the source files. You can build the plugins yourself, or you can grab the build from npm.</p>
<p>If your project already includes npm, you can install the package like this (this is for the <code>highlight</code> plugin, replace with your desired plugin):</p>
<pre><code>npm install @ckeditor/ckeditor5-highlight
</code></pre>
<p>Then you can grab the <code>build</code> folder from the <code>node_modules</code> and copy it to your <code>AssetBundle</code>. If you don't want to install the plugin and just grab the <code>build</code> folder, you can instead download the module as a <code>tar</code> file:</p>
<pre><code>npm pack @ckeditor/ckeditor5-highlight
tar -xzf ckeditor-ckeditor5-highlight-41.2.0.tgz
</code></pre>
<p>The <a href="https://docs.npmjs.com/cli/v10/commands/npm-pack" rel="nofollow noreferrer"><code>pack</code> command</a> will download the package and place it in the current directory as an archive, <code>tar -xzf</code> will extract it. Then you can copy the <code>build</code> folder from the extracted folder.</p>
<p>You can find more info on where to place the plugin folder in <a href="https://craftcms.stackexchange.com/a/40905/11705">my answer here</a>.</p>

CC BY-SA 4.0
2024-10-17T20:06:12.327Z
To keep this updated I will have to manually install newer versions right?
Is there a way to automate this?

As I understand I have craft cms and the ckeditor plugin installed. If I use composer update I will get newer versions of that plugin, but the plugins for ckeditor wont change. There must be a better way, no?

Is there no build included here: `vendor/craftcms/ckeditor/src/web/assets/ckeditor/dist/ckeditor5-dll.js` ?
Merc
CC BY-SA 4.0
2024-10-19T08:27:04.497Z
@Merc The bundle included with the Craft CKEditor plugin will only include the CKEditor plugins that the Craft plugin installs by default. If you're adding custom CKEditor plugins through a module with an asset bundle as described above, you will need to keep those updated manually, yes. It would probably be possible to automate this – install the CKEditor plugin as an NPM module, then move the bundle into the required location in a post-installation script. Haven't tried this yet, though.
MoritzLost
CC BY-SA 4.0
2024-10-20T20:31:26.813Z
Well here: https://github.com/craftcms/ckeditor?tab=readme-ov-file#adding-ckeditor-plugins they talk about that one should check if the plugin is included here: https://github.com/ckeditor/ckeditor5/tree/master/packages and yes the style plugin is included. (⚠️ not to confuse with the basic-styles plugin)

Anyway having to add installations via npm although composer should handle my dependencies seems pretty tedious...
Merc
CC BY-SA 4.0
2024-10-21T08:55:20.213Z
@Merc I think you're misunderstanding the docs here. The first-party CKEditor packages include a DLL-build _inside their NPM files_, they're not included in the CKEditor _Craft plugin_. If you don't want to use NPM in your project, you can also download the files to your module and just track them in your repository. Then you have to manually update them, though.
MoritzLost
CC BY-SA 4.0
2024-10-22T09:04:11.823Z
Ah okay. Indeed I did misunderstand. I will try again and see what works best for me. Thank you
Merc
CC BY-SA 4.0
2024-03-10T18:54:27.397Z
2024-03-10T18:54:27.397Z
MoritzLost
<p>The plugin documentation for craft ckeditor says that first party packages include a build file that I need to add the plugin. I'm not seeing a build directory in any of the ckeditor first party packages. Am I missing something?</p>

CC BY-SA 4.0
2024-03-08T16:33:18.297Z
I have struggled with this one too, we could really do with some more detailed instructions on how to setup first party packages in the plugin
bhackett
<plugins><ckeditor5>
Adding CKEditor first party packages
# Adding CKEditor first party packages

(Asked by: username_0 on 2024-03-08)

The plugin documentation for craft ckeditor says that first party packages include a build file that I need to add the plugin. I'm not seeing a build directory in any of the ckeditor first party packages. Am I missing something?

**Tags:** plugins, ckeditor5

> **Comments:**
> **username_1**: I have struggled with this one too, we could really do with some more detailed instructions on how to setup first party packages in the plugin  

---

## 1 answers

### Answer by username_2 on 2024-03-10. Score: 3 | Accepted answer

The GitHub repository for CKEditor plugins doesn't include the bundled package, just the source files. You can build the plugins yourself, or you can grab the build from npm.
If your project already includes npm, you can install the package like this (this is for the highlight plugin, replace with your desired plugin):
npm install @ckeditor/ckeditor5-highlight

Then you can grab the build folder from the node_modules and copy it to your AssetBundle. If you don't want to install the plugin and just grab the build folder, you can instead download the module as a tar file:
npm pack @ckeditor/ckeditor5-highlight
tar -xzf ckeditor-ckeditor5-highlight-41.2.0.tgz

The pack command will download the package and place it in the current directory as an archive, tar -xzf will extract it. Then you can copy the build folder from the extracted folder.
You can find more info on where to place the plugin folder in my answer here.

> **Comments:**
> **username_3**: To keep this updated I will have to manually install newer versions right? Is there a way to automate this?  As I understand I have craft cms and the ckeditor plugin installed. If I use composer update I will get newer versions of that plugin, but the plugins for ckeditor wont change. There must be a better way, no?  Is there no build included here: `vendor/craftcms/ckeditor/src/web/assets/ckeditor/dist/ckeditor5-dll.js` ?  
> **username_2**: @username_3 The bundle included with the Craft CKEditor plugin will only include the CKEditor plugins that the Craft plugin installs by default. If you're adding custom CKEditor plugins through a module with an asset bundle as described above, you will need to keep those updated manually, yes. It would probably be possible to automate this – install the CKEditor plugin as an NPM module, then move the bundle into the required location in a post-installation script. Haven't tried this yet, though.  
> **username_3**: Well here: https://github.com/craftcms/ckeditor?tab=readme-ov-file#adding-ckeditor-plugins they talk about that one should check if the plugin is included here: https://github.com/ckeditor/ckeditor5/tree/master/packages and yes the style plugin is included. (⚠️ not to confuse with the basic-styles plugin)  Anyway having to add installations via npm although composer should handle my dependencies seems pretty tedious...  
> **username_2**: @username_3 I think you're misunderstanding the docs here. The first-party CKEditor packages include a DLL-build _inside their NPM files_, they're not included in the CKEditor _Craft plugin_. If you don't want to use NPM in your project, you can also download the files to your module and just track them in your repository. Then you have to manually update them, though.  
> **username_3**: Ah okay. Indeed I did misunderstand. I will try again and see what works best for me. Thank you  

---

