New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to install plugins with Composer #38
Comments
3rd party plugins are not available through Composer and will never be, because we cannot publish these plugins. Therefore, the recommended way in your case is to build a package. |
So, if I were to build a package... that'd ruin the point of Composer, no? I wouldn't have a way to reference it. |
Yes. In general – if you want to customise the editor, then using either CDN-ed or npm/Composer/Bower version may not make sense (depends on whether you strip or add stuff and how much). CKEditor needs to be built in order to be properly optimised. And building is much more complex than just concatenating stuff so that needs to be done by our builder (it's also available in CLI). Of course you can be brutal and load some of our presets plus load the 3rd party plugins you want, but that won't give a good result (the result can in fact be very bad if you load multiple plugins). On http://cdn.ckeditor.com/ you can find how to load local plugins and skins. You can install CKEditor using Composer plus the syntaxhighlight plugin in some other way (unless Composer allows installing straight from a Git repo – then you can use its repo). Then, just notify CKEditor about that plugin and it'll work. But please remember that it stops making sense when you load more plugins this way. |
@albertvolkman you can add repositories into your composer.json
Then in your require section: It is the current way the Webform module in Drupal 8 (https://www.drupal.org/project/webform) offers to do to download the library. |
@FlorentTorregrosa: The code above does not work, even when the url is changed to https. Every time, composer issues this error: `Downloading https://download.ckeditor.com/autogrow/releases/autogrow_4.6.2.zip Failed: [Composer\Downloader\TransportException] 0: Content-Length mismatch, received 0 bytes out of the expected 290 Installation failed, reverting ./composer.json to its original content. [Composer\Downloader\TransportException] Exception trace: Is there something else required in the the composer.json? |
@mariagwyn: hello. Do you also have a "composer/installers": "^1.0.21", in your "require" section of Composer? Such as https://github.com/Drupal-FR/site-drupalfr/blob/8.x-1.x/composer.json Now I use the Drush comand provided by Webform to upload my composer.json, and it works. |
Installers is already required. So you never got this command actually working? I am able to use the identical setup for other downloads and it works. I wonder if ckeditors site does not take curl command, or whatever it is that composer uses. |
@mariagwyn This code used to work as I have been using this method to install ckeditor plugins which has been working fine until recently. Now I get the error "Content-length mismatch" and it will not download. |
@erichomanchuk, did you got it to work again? I am also getting this 'Content-length mismatch' error and can't get it to work. |
@RDeuzeman, had no luck getting it to work so I had to move the zip files to our private server to be able to download them. |
All: I started a new issue (linked above) and pinged you all there. |
I haven't had any luck in finding direction on this. I'd like to use Composer to install CKEditor. This works, however there's no clear way to add the plugins I need. For example-
http://ckeditor.com/addon/syntaxhighlight
What's the best method to do this?
The text was updated successfully, but these errors were encountered: