How can I use CKEditor from npm with webpack?
Ideally I want npm install ckeditor --save then var CK = require(\'ckeditor\'); without any g
npm install ckeditor --save-dev
require('ckeditor');
After loading chkeditor becomes available as global variable CKEDITOR
CKEDITOR.replace('elementId');
The editor loads it's own required CSS/JS assets, likely these cannot be found. You can refer to the CDN version for these resources or you can copy the CKeditor directory to an public reachable folder. Define the URL of the public reachable resources with CKEDITOR_BASEPATH.
window.CKEDITOR_BASEPATH = '//cdn.ckeditor.com/4.6.2/full-all/';
Note: Define window.CKEDITOR_BASEPATH before your import statement!