Answers.Body: <blockquote>
  <p>What does Craft Plugin mean in this context?</p>
  </blockquote>
  <p>It means a normal Craft plugin – you can find documentation on Craft plugins in <a href="https://craftcms.com/docs/4.x/extend/plugin-guide.html" rel="nofollow noreferrer">How to Build a Plugin</a>. Usually, a plugin is used if you want to make it available to other people through the plugin store. However, you can also create <a href="https://craftcms.com/docs/4.x/extend/plugin-guide.html#private-plugins" rel="nofollow noreferrer">private plugins</a> for individual sites.</p>
  <p>You can also create a <a href="https://craftcms.com/docs/4.x/extend/module-guide.html" rel="nofollow noreferrer">module</a>, which is part of one specific site / project. If you're unsure what you need, I would use a module, since it has less overhead than a plugin. You can put the asset bundle and the hook that registers it inside a module as well.</p>
  <blockquote>
  <p>Where do i create and add the asset bundle?</p>
  </blockquote>
  <p>You can find the <a href="https://craftcms.com/docs/4.x/extend/asset-bundles.html" rel="nofollow noreferrer">documentation on Asset Bundles here</a>. Basically, it's a class that defines some assets (e.g. static JS/CSS files) to be published. This is required for your plugin's or module's assets to be publicly accessible, since plugins and modules are not inside the web root. An asset bundle can include assets to be published, which just means they're copied to the <code>cpresources</code> folder in the web root.</p>
  <p>To create the asset bundle, use the example in the CKEditor plugin's README and put it inside your module/plugin – the asset bundle documentation includes an example for the recommended folder structure. Then register it using the hook that's included in the README as well.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-29T12:18:36.430Z
Answers.Text: ah ok. thanks. normal Craft Plugin then. But module is better, i think so too. Was'nt sure, if i have to go this extra round for this little additional feature.
Answers.UserDisplayName: Henrik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-29T12:33:41.387Z
Answers.Text: @Henrik Basically every adjustment beyond templating needs to go into a module, but a simple module is really simple to create! Check out the guide I linked above, or you can also use the [generator](https://github.com/craftcms/generator) if you like.
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-03T17:26:29.180Z
Answers.Text: @MoitzLost i created a module and also the "DLL-compatible package", wich lives now as a folder outside the module folder (not sure if this should be different). Now i dont know where to include the extra package i would like to add. It is this one (https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html), where i basically need the automated transform to more european quotes.
Answers.UserDisplayName: Henrik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-04T13:49:40.830Z
Answers.Text: @Henrik You can put the folder inside a `resources` folder in your module. Then create the asset bundle and point it to that folder – for example, by defining an alias pointing to for your module's base directory. This is all mentioned in the [asset bundle documentation](https://craftcms.com/docs/4.x/extend/asset-bundles.html#setting-it-up) – see the code example and the note regarding the namespace below.
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-06T15:13:52.167Z
Answers.Text: (sorry for misspelling). thanks, i think i did everything right, but no luck so far. i find it quite confusing with all this different files and setup. (extend a plugin with an external package, via an own module). 
  The last code Block on the readme page of the craft ckeditor github page: this comes into the main module.php file in the crafts module folder, right?
Answers.UserDisplayName: Henrik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-06T15:44:58.537Z
Answers.Text: @Henrik Yes, it should go into the `init()` method of your module. Make sure to register your module _and_ add it to the `bootstrap` section in your `config/app.php` to make sure it's loaded for every request. You can use `\Craft::dd('Some value')` statements to make sure your module and your hook are being executed at all.
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-10T11:32:15.793Z
Answers.Text: The Module is working, i did it with the craft generator. I see "Module is loaded" with this: `Craft::dd('Module is loaded')`. The part which makes me thinking if i am right is: "Once the CKEditor package is in place in your Craft plugin". What does it mean; is in place? Where do i have to put the generated ddl package? Right now it is in the Asset folder of my module. But i think this is not right.
Answers.UserDisplayName: Henrik
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-10T12:54:56.117Z
Answers.Text: @Henrik As I said, I would put it inside a `resources` folder inside your module. But you can put it anywhere as long as you specify the correct path in your `AssetBundle`.
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-05T09:52:36.577Z
Answers.Text: Hey @Henrik, did you get this working? Would love to see how you did it.
Answers.UserDisplayName: Mark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-17T19:38:21.647Z
Answers.Text: I want to use a first party ckeditor plugin `styles` https://ckeditor.com/docs/ckeditor5/latest/features/style.html#installation, but I cannot find that build file within my craft installation. is it:
  `vendor/craftcms/ckeditor/src/web/assets/ckeditor/dist/ckeditor5-dll.js` ?
  
  I really struggle with that documentation there
Answers.UserDisplayName: Merc
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-17T20:11:49.267Z
Answers.Text: Could you maybe give me some idea what kind of folder structure I need?
  For the plugin I need something like: `my-project-name/plugins/styles-plugin/src/StylesPlugin.php`. I also have that asset bundle which lives here `my-project-name/src/StylesBundle.php` according to https://craftcms.com/docs/4.x/extend/asset-bundles.html#setting-it-up. Also in there I have `my-project-name/src/resources` where I have to copy/paste the build?
  Within my plugin in init I have to register my asset bundle and also add the plugin to my composer.json?
  
  But I dont really understand how that all comes together.
Answers.UserDisplayName: Merc
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-19T08:34:26.273Z
Answers.Text: @Merc You need to download the plugin through NPM, it's not included in the Craft plugin as far as I know, see my other answer on that. If you're having trouble with setting up a plugin or module (if you're not sure which you need, I recommend a module, simpler to set up) – use the [Craft generator](https://github.com/craftcms/generator) to take care of that!
Answers.UserDisplayName: MoritzLost
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-29T10:02:28.753Z
Answers.LastActivityDate: 2023-06-29T10:02:28.753Z
Answers.UserDisplayName: MoritzLost
Body: <p>using the new ckeditor5 and want to include additional features
  <a href="https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html" rel="nofollow noreferrer">https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html</a></p>
  <p>I want to convert quotes (&quot;&quot;) to european quotes («», or „“) and as i understand, this extra features does exactly this.(?)</p>
  <p>As this feature is not installed in the basic plugin setup i need to install it via plugin, following these steps ( am i right?)
  <a href="https://github.com/craftcms/ckeditor#adding-ckeditor-plugins" rel="nofollow noreferrer">https://github.com/craftcms/ckeditor#adding-ckeditor-plugins</a></p>
  <p>I have to create a custom plugin and started with the second step.</p>
  <blockquote>
  <p>If you’re creating a custom CKEditor plugin, use CKEditor’s package
  generator to scaffold it, and run its dll:build command to create a
  DLL-compatible package.</p>
  </blockquote>
  <p>Now i have a ckeditor plugin in my main directory and dont know what the
  following steps mean, or how to proceed?:</p>
  <blockquote>
  <p>Once the CKEditor package is in place in your Craft plugin, create an
  asset bundle which extends BaseCkeditorPackageAsset.</p>
  </blockquote>
  <p>What does <em>Craft Plugin</em> mean in this context?
  Where do i create and add the <em>asset bundle</em>?</p>
  <p>Thanks for your help.</p>
  
Tags: <ckeditor5>
Title: How to add additional features (plugins) to ckeditor5
ThreadText: # How to add additional features (plugins) to ckeditor5
  
  (Asked by: username_0 on 2023-06-29)
  
  using the new ckeditor5 and want to include additional features
  <https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html>
  
  I want to convert quotes ("") to european quotes («», or „“) and as i understand, this extra features does exactly this.(?)
  
  As this feature is not installed in the basic plugin setup i need to install it via plugin, following these steps ( am i right?)
  <https://github.com/craftcms/ckeditor#adding-ckeditor-plugins>
  
  I have to create a custom plugin and started with the second step.
  
  > If you’re creating a custom CKEditor plugin, use CKEditor’s package
  > generator to scaffold it, and run its dll:build command to create a
  > DLL-compatible package.
  
  Now i have a ckeditor plugin in my main directory and dont know what the
  following steps mean, or how to proceed?:
  
  > Once the CKEditor package is in place in your Craft plugin, create an
  > asset bundle which extends BaseCkeditorPackageAsset.
  
  What does *Craft Plugin* mean in this context?
  Where do i create and add the *asset bundle*?
  
  Thanks for your help.
  
  **Tags:** ckeditor5
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-06-29. Score: 1 | Accepted answer
  
  > What does Craft Plugin mean in this context?
  
  It means a normal Craft plugin – you can find documentation on Craft plugins in [How to Build a Plugin](https://craftcms.com/docs/4.x/extend/plugin-guide.html). Usually, a plugin is used if you want to make it available to other people through the plugin store. However, you can also create [private plugins](https://craftcms.com/docs/4.x/extend/plugin-guide.html#private-plugins) for individual sites.
  
  You can also create a [module](https://craftcms.com/docs/4.x/extend/module-guide.html), which is part of one specific site / project. If you're unsure what you need, I would use a module, since it has less overhead than a plugin. You can put the asset bundle and the hook that registers it inside a module as well.
  
  > Where do i create and add the asset bundle?
  
  You can find the [documentation on Asset Bundles here](https://craftcms.com/docs/4.x/extend/asset-bundles.html). Basically, it's a class that defines some assets (e.g. static JS/CSS files) to be published. This is required for your plugin's or module's assets to be publicly accessible, since plugins and modules are not inside the web root. An asset bundle can include assets to be published, which just means they're copied to the `cpresources` folder in the web root.
  
  To create the asset bundle, use the example in the CKEditor plugin's README and put it inside your module/plugin – the asset bundle documentation includes an example for the recommended folder structure. Then register it using the hook that's included in the README as well.
  
  > **Comments:**
  > **username_0**: ah ok. thanks. normal Craft Plugin then. But module is better, i think so too. Was'nt sure, if i have to go this extra round for this little additional feature.  
  > **username_1**: @username_0 Basically every adjustment beyond templating needs to go into a module, but a simple module is really simple to create! Check out the guide I linked above, or you can also use the [generator](https://github.com/craftcms/generator) if you like.  
  > **username_0**: @MoitzLost i created a module and also the "DLL-compatible package", wich lives now as a folder outside the module folder (not sure if this should be different). Now i dont know where to include the extra package i would like to add. It is this one (https://ckeditor.com/docs/ckeditor5/latest/features/text-transformation.html), where i basically need the automated transform to more european quotes.  
  > **username_1**: @username_0 You can put the folder inside a `resources` folder in your module. Then create the asset bundle and point it to that folder – for example, by defining an alias pointing to for your module's base directory. This is all mentioned in the [asset bundle documentation](https://craftcms.com/docs/4.x/extend/asset-bundles.html#setting-it-up) – see the code example and the note regarding the namespace below.  
  > **username_0**: (sorry for misspelling). thanks, i think i did everything right, but no luck so far. i find it quite confusing with all this different files and setup. (extend a plugin with an external package, via an own module).  The last code Block on the readme page of the craft ckeditor github page: this comes into the main module.php file in the crafts module folder, right?  
  > **username_1**: @username_0 Yes, it should go into the `init()` method of your module. Make sure to register your module _and_ add it to the `bootstrap` section in your `config/app.php` to make sure it's loaded for every request. You can use `\Craft::dd('Some value')` statements to make sure your module and your hook are being executed at all.  
  > **username_0**: The Module is working, i did it with the craft generator. I see "Module is loaded" with this: `Craft::dd('Module is loaded')`. The part which makes me thinking if i am right is: "Once the CKEditor package is in place in your Craft plugin". What does it mean; is in place? Where do i have to put the generated ddl package? Right now it is in the Asset folder of my module. But i think this is not right.  
  > **username_1**: @username_0 As I said, I would put it inside a `resources` folder inside your module. But you can put it anywhere as long as you specify the correct path in your `AssetBundle`.  
  > **username_2**: Hey @username_0, did you get this working? Would love to see how you did it.  
  > **username_3**: I want to use a first party ckeditor plugin `styles` https://ckeditor.com/docs/ckeditor5/latest/features/style.html#installation, but I cannot find that build file within my craft installation. is it: `vendor/craftcms/ckeditor/src/web/assets/ckeditor/dist/ckeditor5-dll.js` ?  I really struggle with that documentation there  
  > **username_3**: Could you maybe give me some idea what kind of folder structure I need? For the plugin I need something like: `my-project-name/plugins/styles-plugin/src/StylesPlugin.php`. I also have that asset bundle which lives here `my-project-name/src/StylesBundle.php` according to https://craftcms.com/docs/4.x/extend/asset-bundles.html#setting-it-up. Also in there I have `my-project-name/src/resources` where I have to copy/paste the build? Within my plugin in init I have to register my asset bundle and also add the plugin to my composer.json?  But I dont really understand how that all comes together.  
  > **username_1**: @username_3 You need to download the plugin through NPM, it's not included in the Craft plugin as far as I know, see my other answer on that. If you're having trouble with setting up a plugin or module (if you're not sure which you need, I recommend a module, simpler to set up) – use the [Craft generator](https://github.com/craftcms/generator) to take care of that!  
  
  ---
  
  