Frage

I am struggling to install ckeditor with Bower, I have tried a bunch of different things but each time I end up with just a .bower.json file and a Readme file or index file. I never get more than 2 files :( I am able to install other packages just fine, so I know things are set up ok.

Here are some things I have tried:

    {
       "dependencies": {
          "ckeditor": "latest",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/releases/tag/4.2.1/standard",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/releases/tag/4.2.1/standard",

          "ckeditor": "https://github.com/ckeditor/ckeditor-releases/commit/a822d585d4ebf8d969fa" 
       }
    }

Why is this package different than the rest? What is the key to crack it?

War es hilfreich?

Lösung

Since version 4.3.3 CKEditor introduced support for Bower. You may simply install it with following command:

bower install ckeditor

You may also download it by setting dependencies in your bower.json:

{
    "name": "my-project",
    "dependencies": {
        "ckeditor": "4"
    }
}

After that fetch dependencies with:

bower update

Note: that it will download standard-all preset, which essentially contains all the official plugins available, but only part of them enabled in configuration.

More information can be found in CKEditor package managers guide.

Andere Tipps

Sometimes you want a specific preset with a specific version of ckeditor.

First off, here is a helpful ckeditor post that will facilitate the required syntax to specify the repository tag.

Here is an example of what to include in your bower.json file:

{
 name: "your-name",
  "dependencies": {
      "ckeditor": "#full/4.3.3"
  }
}

Simply swap out 'full' with either basic, standard, or which ever you desire as well as the version.

then run:

bower update

It doesn't have any valid semver git tagged releases so Bower tries to fetch the master branch, which only contains the readme. Use bower install ckeditor#stable/standard instead.

Now it will work if you just use:

'ckeditor: "*"'

inside your bower.json. this will, however only pull the standard version. For more information on this issue see:

dev.ckeditor.com/ticket/11279

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top