Skip to content

Using Composer for Custom CKEditor Instance

Chris Pelzer edited this page Jan 14, 2019 · 1 revision
  1. Fork the repo ckeditor/ckeditor-releases

  2. Within your composer.json add to the repositories like below, replacing {username} with the user you used to fork the ckeditor/ckeditor-releases repo.

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/{username}/ckeditor-releases"
        },
        
        ...
    ],
    
    "require": {
        "ckeditor/ckeditor": "dev-full/4.10.x-mycustomckeditorbranch",
       
        ...
    }
    
  3. Add to your build a way to symbolic link the vendor/ckeditor/ckeditor folder to public/js/ckeditor

    The below is an example of what can be added to webpack.mix.js

     const fs = require('fs');
     
     ...
    
     fs.symlink(
         path.resolve('vendor/ckeditor/ckeditor'),
         path.resolve('public/js/ckeditor'),
         function (err) { err != null && err.errno != -17 ? console.log(err) : console.log("Done."); }
     );
    
  4. Replace ckeditor_url under the published config config/nova/ckeditor-field.php to be

    'ckeditor_url' => config('app.url').'/js/ckeditor/ckeditor.js',
    
Clone this wiki locally