Search code examples
ckeditor

How to use CKEditor as an NPM module built with webpack or similar


How can I use CKEditor from npm with webpack?

Ideally I want npm install ckeditor --save then var CK = require('ckeditor'); without any global namespace pollution.


Solution

  • CKEditor was published on NPM.

    Now you can use exactly the commands you want.

    Install

    npm install ckeditor --save-dev
    

    Inject

    var CK = require('ckeditor');