Yeoman angular-fullstack ckeditor production

162 views Asked by At

I'm using yeoman's angular-fullstack generator with default parameters.

I would like to use ckeditor with https://github.com/lemonde/angular-ckeditor , so I extended my bower.json with the following lines:

"ckeditor": "#full/4.4.7",
"angular-ckeditor": "~0.4.2"

It works well in development mode ( grunt serve ), but it fails in production ( grunt serve:dist ). It tries to load /config.js and /skins/moono/editor_gecko.css and the language file dynamically, but it fails.

Have anybody idea how to solve it?

1

There are 1 answers

0
ptheofan On

Had similar issue with ACE editor. What I did is I added override in bower.json

for ace looks like this

  "overrides": {
    "ace-builds": {
      "main": [
        "src-noconflict/ace.js",
        "src-noconflict/theme-monokai.js",
        "src-noconflict/worker-javascript.js",
        "src-noconflict/mode-javascript.js"
      ]
    },

for you ckeditor config you can specify it in a similar way in the overrides i.e.

 "overrides": {
   "ckeditor": {
     "main": [
       "path/to/your/ckeditor.js",
       "path/to/your/ckeditor/config.js"
     ]
   }
 }

for the CSS, not sure but if you check your gruntfile you might come up with a simple solution (i.e. add one more folder to the CSS sources).

If you find a nice CSS solution please post it as it could be helpful to more people ;)