8
0
فهرست منبع

Final cleanup.

Piotrek Koszuliński 8 سال پیش
والد
کامیت
3bc37e2b87

+ 67 - 1
packages/ckeditor5-build-classic/README.md

@@ -5,7 +5,73 @@ CKEditor 5 classic build
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic?type=dev)
 
-Classic build of CKEditor 5. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-build-classic>.
+Classic build of CKEditor 5. Features the [classic creator](https://github.com/ckeditor/ckeditor5-editor-classic) and the standard set of article features.
+
+## Bundles
+
+The package contain two bundles of the classic editor:
+
+* `build/ckeditor.js` – minified, ES6 version of the bundle,
+* `build/ckeditor.compat.js` – minified, backward-compatible version of the bundle (`babel-preset-env` is configured to support `[ 'last 2 versions', 'ie >= 11' ]`).
+
+## Usage
+
+First, install the build from npm:
+
+```
+npm install --save @ckeditor/ckeditor5-build-classic
+```
+
+And use it in your website:
+
+```html
+<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:
+
+```js
+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're planning to integrate CKEditor 5 deep into your application it's actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`).
+
+## Rebuilding the bundle
+
+**Note:** This section assumes that you cloned this package repository and execute the commands inside it.
+
+You can modify `config-editor.js`, `config-build.js` or any of the Webpack configs 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`.
 
 ## License
 

+ 1 - 1
packages/ckeditor5-build-classic/ckeditor.js

@@ -5,9 +5,9 @@
 
 import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classic';
 import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
-import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold';
 import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic';
+import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard';
 import EnterPlugin from '@ckeditor/ckeditor5-enter/src/enter';
 import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading';
 import ImagePlugin from '@ckeditor/ckeditor5-image/src/image';

+ 1 - 1
packages/ckeditor5-build-classic/package.json

@@ -19,7 +19,7 @@
     "@ckeditor/ckeditor5-undo": "*"
   },
   "devDependencies": {
-    "@ckeditor/ckeditor5-dev-utils": "^2.4.2",
+    "@ckeditor/ckeditor5-dev-utils": "^2.5.0",
     "babel-core": "^6.24.0",
     "babel-loader": "^6.4.0",
     "babel-preset-env": "^1.2.2",

+ 23 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.html

@@ -0,0 +1,23 @@
+<div id="editor">
+	<h2>About CKEditor&nbsp;5</h2>
+
+	<p>This is <a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a>.</p>
+
+	<figure class="image">
+		<img src="./sample.jpg" alt="Autumn fields" />
+	</figure>
+
+	<p>After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly <strong>extensible and flexible architecture</strong> which consists of an <strong>amazing editing framework</strong> and <strong>editing solutions</strong> that will be built on top of it.</p>
+
+	<h3>Notes</h3>
+
+	<p><a href="https://ckeditor5.github.io">CKEditor&nbsp;5</a> is <em>under heavy development</em> and this demo is not production-ready software. For example:</p>
+
+	<ul>
+		<li><strong>Only Chrome, Opera and Safari are supported</strong>.</li>
+		<li>Firefox requires enabling the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/onselectionchange">&ldquo;dom.select_events.enabled&rdquo;</a> option.</li>
+		<li><a href="https://github.com/ckeditor/ckeditor5/issues/342">Support for pasting</a> is under development (content filtering is unstable).</li>
+	</ul>
+
+	<p>It has <em>bugs</em> that we are aware of &mdash; and that we will be working on in the next few iterations of the project. Stay tuned for some updates soon!</p>
+</div>

+ 14 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.js

@@ -0,0 +1,14 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+const ClassicEditor = require( '../../build/ckeditor' ).ClassicEditor;
+
+ClassicEditor.create( document.querySelector( '#editor' ) )
+	.then( editor => {
+		window.editor = editor;
+	} )
+	.catch( err => {
+		console.error( err.stack );
+	} );

+ 3 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.md

@@ -0,0 +1,3 @@
+# CKEditor 5 classic build – standard version (CommonJS `require()`)
+
+Just play with it.