|
|
преди 8 години | |
|---|---|---|
| .. | ||
| bin | преди 8 години | |
| build | преди 8 години | |
| sample | преди 8 години | |
| tests | преди 8 години | |
| .editorconfig | преди 8 години | |
| .gitattributes | преди 8 години | |
| .gitignore | преди 8 години | |
| .npmignore | преди 8 години | |
| CHANGELOG.md | преди 8 години | |
| CONTRIBUTING.md | преди 8 години | |
| LICENSE.md | преди 8 години | |
| README.md | преди 8 години | |
| build-config.js | преди 8 години | |
| ckeditor.js | преди 8 години | |
| package.json | преди 8 години | |
| webpack.compat.config.js | преди 8 години | |
| webpack.config.js | преди 8 години | |
Classic build of CKEditor 5. Features the classic creator and the standard set of article features.
The package contains two bundles of the classic editor:
build/ckeditor.js – A minified, ES6 version of the bundle.build/ckeditor.compat.js – A minified, backward-compatible version of the bundle (babel-preset-env is configured to support 'last 2 versions', 'ie >= 11').First, install the build from npm:
npm install --save @ckeditor/ckeditor5-build-classic
And use it in your website:
<div id="editor">
<p>This is the editor content.</p>
</div>
<script src="./node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js"></script>
<script>
ClassicEditor.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
</script>
Or in your JavaScript application:
import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/build/ckeditor';
// Or using CommonJS verion:
// const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic/build/ckeditor' ).ClassicEditor;
ClassicEditor.create( document.querySelector( '#editor' ) )
.then( editor => {
window.editor = editor;
} )
.catch( err => {
console.error( err.stack );
} );
Note: If you are planning to integrate CKEditor 5 deep into your application it is actually more convenient and recommended to install and import the source modules directly (like it happens in ckeditor.js).
Note: This section assumes that you cloned this package repository and execute the commands inside it.
You can modify build-config.js or any of the webpack configurations and run:
npm run build
to rebuild the entry point (ckeditor.js) and both builds (build/*).
You can also modify ckeditor.js directly and run one of npm run build-ckeditor or npm run build-ckeditor-compat.
Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the LICENSE.md file.