Explorar el Código

Merge pull request #3 from ckeditor/t/1

Feature: Initial implementation. Closes #1.
Piotrek Koszuliński hace 8 años
padre
commit
fea6e42579
Se han modificado 31 ficheros con 791 adiciones y 0 borrados
  1. 18 0
      packages/ckeditor5-build-classic/.gitattributes
  2. 1 0
      packages/ckeditor5-build-classic/.gitignore
  3. 2 0
      packages/ckeditor5-build-classic/.npmignore
  4. 4 0
      packages/ckeditor5-build-classic/CONTRIBUTING.md
  5. 23 0
      packages/ckeditor5-build-classic/LICENSE.md
  6. 78 0
      packages/ckeditor5-build-classic/README.md
  7. 9 0
      packages/ckeditor5-build-classic/bin/build-ckeditor-compat.sh
  8. 9 0
      packages/ckeditor5-build-classic/bin/build-ckeditor.sh
  9. 17 0
      packages/ckeditor5-build-classic/bin/create-entry-file.js
  10. 6 0
      packages/ckeditor5-build-classic/build/ckeditor.compat.js
  11. 1 0
      packages/ckeditor5-build-classic/build/ckeditor.compat.js.map
  12. 6 0
      packages/ckeditor5-build-classic/build/ckeditor.js
  13. 1 0
      packages/ckeditor5-build-classic/build/ckeditor.js.map
  14. 44 0
      packages/ckeditor5-build-classic/ckeditor.js
  15. 28 0
      packages/ckeditor5-build-classic/config-build.js
  16. 20 0
      packages/ckeditor5-build-classic/config-editor.js
  17. 48 0
      packages/ckeditor5-build-classic/package.json
  18. 69 0
      packages/ckeditor5-build-classic/sample/index.html
  19. 149 0
      packages/ckeditor5-build-classic/tests/ckeditor.js
  20. 23 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.html
  21. 14 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.js
  22. 9 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor-cjs-version.md
  23. 23 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.html
  24. 14 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.js
  25. 9 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.md
  26. 23 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.html
  27. 14 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.js
  28. 9 0
      packages/ckeditor5-build-classic/tests/manual/ckeditor.md
  29. BIN
      packages/ckeditor5-build-classic/tests/manual/sample.jpg
  30. 73 0
      packages/ckeditor5-build-classic/webpack.compat.config.js
  31. 47 0
      packages/ckeditor5-build-classic/webpack.config.js

+ 18 - 0
packages/ckeditor5-build-classic/.gitattributes

@@ -0,0 +1,18 @@
+*			text=auto
+
+*.htaccess	eol=lf
+*.cgi		eol=lf
+*.sh		eol=lf
+
+*.css		text
+*.htm		text
+*.html		text
+*.js		text
+*.json		text
+*.php		text
+*.txt		text
+*.md		text
+
+*.png		-text
+*.gif		-text
+*.jpg		-text

+ 1 - 0
packages/ckeditor5-build-classic/.gitignore

@@ -0,0 +1 @@
+node_modules/**

+ 2 - 0
packages/ckeditor5-build-classic/.npmignore

@@ -0,0 +1,2 @@
+tests/**
+sample/**

+ 4 - 0
packages/ckeditor5-build-classic/CONTRIBUTING.md

@@ -0,0 +1,4 @@
+Contributing
+========================================
+
+Information about contributing can be found on the following page: <https://github.com/ckeditor/ckeditor5/blob/master/CONTRIBUTING.md>.

+ 23 - 0
packages/ckeditor5-build-classic/LICENSE.md

@@ -0,0 +1,23 @@
+Software License Agreement
+==========================
+
+**CKEditor 5 classic build** – https://github.com/ckeditor/ckeditor5-build-classic <br>
+Copyright (c) 2003-2017, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
+
+Licensed under the terms of any of the following licenses at your choice:
+
+* [GNU General Public License Version 2 or later (the "GPL")](http://www.gnu.org/licenses/gpl.html)
+* [GNU Lesser General Public License Version 2.1 or later (the "LGPL")](http://www.gnu.org/licenses/lgpl.html)
+* [Mozilla Public License Version 1.1 or later (the "MPL")](http://www.mozilla.org/MPL/MPL-1.1.html)
+
+You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses.
+
+Sources of Intellectual Property Included in CKEditor
+-----------------------------------------------------
+
+Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
+
+Trademarks
+----------
+
+**CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

+ 78 - 0
packages/ckeditor5-build-classic/README.md

@@ -0,0 +1,78 @@
+CKEditor 5 classic build
+========================================
+
+[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-build-classic.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-classic)
+[![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. 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
+
+Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the `LICENSE.md` file.

+ 9 - 0
packages/ckeditor5-build-classic/bin/build-ckeditor-compat.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+echo "Building 'build/ckeditor.compat.js'..."
+echo ""
+
+webpack --config webpack.compat.config.js
+
+echo ""
+echo "Done."

+ 9 - 0
packages/ckeditor5-build-classic/bin/build-ckeditor.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+echo "Building 'build/ckeditor.js'..."
+echo ""
+
+webpack
+
+echo ""
+echo "Done."

+ 17 - 0
packages/ckeditor5-build-classic/bin/create-entry-file.js

@@ -0,0 +1,17 @@
+#!/usr/bin/env node
+
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
+const buildConfig = require( '../config-build' );
+
+console.log( 'Creating the entry file...' );
+
+bundler.createEntryFile( 'ckeditor.js', './config-editor', buildConfig );
+
+console.log( 'Done.' );

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6 - 0
packages/ckeditor5-build-classic/build/ckeditor.compat.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
packages/ckeditor5-build-classic/build/ckeditor.compat.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6 - 0
packages/ckeditor5-build-classic/build/ckeditor.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
packages/ckeditor5-build-classic/build/ckeditor.js.map


+ 44 - 0
packages/ckeditor5-build-classic/ckeditor.js

@@ -0,0 +1,44 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classic';
+import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat';
+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';
+import ImagecaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption';
+import ImagestylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle';
+import ImagetoolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar';
+import LinkPlugin from '@ckeditor/ckeditor5-link/src/link';
+import ListPlugin from '@ckeditor/ckeditor5-list/src/list';
+import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph';
+import TypingPlugin from '@ckeditor/ckeditor5-typing/src/typing';
+import UndoPlugin from '@ckeditor/ckeditor5-undo/src/undo';
+
+export class ClassicEditor extends ClassicEditorBase {}
+
+ClassicEditor.build = {
+	plugins: [
+		AutoformatPlugin,
+		BoldPlugin,
+		ItalicPlugin,
+		ClipboardPlugin,
+		EnterPlugin,
+		HeadingPlugin,
+		ImagePlugin,
+		ImagecaptionPlugin,
+		ImagestylePlugin,
+		ImagetoolbarPlugin,
+		LinkPlugin,
+		ListPlugin,
+		ParagraphPlugin,
+		TypingPlugin,
+		UndoPlugin
+	],
+	config: require( './config-editor' )
+};

+ 28 - 0
packages/ckeditor5-build-classic/config-build.js

@@ -0,0 +1,28 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+module.exports = {
+	editor: '@ckeditor/ckeditor5-editor-classic/src/classic',
+	moduleName: 'ClassicEditor',
+	plugins: [
+		'@ckeditor/ckeditor5-autoformat/src/autoformat',
+		'@ckeditor/ckeditor5-basic-styles/src/bold',
+		'@ckeditor/ckeditor5-basic-styles/src/italic',
+		'@ckeditor/ckeditor5-clipboard/src/clipboard',
+		'@ckeditor/ckeditor5-enter/src/enter',
+		'@ckeditor/ckeditor5-heading/src/heading',
+		'@ckeditor/ckeditor5-image/src/image',
+		'@ckeditor/ckeditor5-image/src/imagecaption',
+		'@ckeditor/ckeditor5-image/src/imagestyle',
+		'@ckeditor/ckeditor5-image/src/imagetoolbar',
+		'@ckeditor/ckeditor5-link/src/link',
+		'@ckeditor/ckeditor5-list/src/list',
+		'@ckeditor/ckeditor5-paragraph/src/paragraph',
+		'@ckeditor/ckeditor5-typing/src/typing',
+		'@ckeditor/ckeditor5-undo/src/undo',
+	]
+};

+ 20 - 0
packages/ckeditor5-build-classic/config-editor.js

@@ -0,0 +1,20 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+module.exports = {
+	toolbar: [
+		'headings',
+		'bold',
+		'italic',
+		'link',
+		'unlink',
+		'bulletedList',
+		'numberedList',
+		'undo',
+		'redo'
+	]
+};

+ 48 - 0
packages/ckeditor5-build-classic/package.json

@@ -0,0 +1,48 @@
+{
+  "name": "@ckeditor/ckeditor5-build-classic",
+  "version": "0.0.1",
+  "description": "CKEditor 5 classic build.",
+  "keywords": [],
+  "main": "./build/ckeditor.js",
+  "dependencies": {
+    "@ckeditor/ckeditor5-editor-classic": "*",
+    "@ckeditor/ckeditor5-autoformat": "*",
+    "@ckeditor/ckeditor5-basic-styles": "*",
+    "@ckeditor/ckeditor5-clipboard": "*",
+    "@ckeditor/ckeditor5-enter": "*",
+    "@ckeditor/ckeditor5-heading": "*",
+    "@ckeditor/ckeditor5-image": "*",
+    "@ckeditor/ckeditor5-link": "*",
+    "@ckeditor/ckeditor5-list": "*",
+    "@ckeditor/ckeditor5-paragraph": "*",
+    "@ckeditor/ckeditor5-typing": "*",
+    "@ckeditor/ckeditor5-undo": "*"
+  },
+  "devDependencies": {
+    "@ckeditor/ckeditor5-dev-utils": "^2.5.0",
+    "babel-core": "^6.24.0",
+    "babel-loader": "^6.4.0",
+    "babel-preset-env": "^1.2.2",
+    "babili-webpack-plugin": "^0.0.11",
+    "regenerator-runtime": "^0.10.3",
+    "webpack": "^2.3.2"
+  },
+  "engines": {
+    "node": ">=6.0.0",
+    "npm": ">=3.0.0"
+  },
+  "author": "CKSource (http://cksource.com/)",
+  "license": "(GPL-2.0 OR LGPL-2.1 OR MPL-1.1)",
+  "homepage": "https://ckeditor5.github.io",
+  "bugs": "https://github.com/ckeditor/ckeditor5-build-classic/issues",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/ckeditor/ckeditor5-build-classic.git"
+  },
+  "scripts": {
+    "build": "npm run create-entry-file && npm run build-ckeditor && npm run build-ckeditor-compat",
+    "create-entry-file": "./bin/create-entry-file.js",
+    "build-ckeditor": "./bin/build-ckeditor.sh",
+    "build-ckeditor-compat": "./bin/build-ckeditor-compat.sh"
+  }
+}

+ 69 - 0
packages/ckeditor5-build-classic/sample/index.html

@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="utf-8">
+	<title>CKEditor 5 – classic build sample</title>
+	<style>
+		body {
+			max-width: 800px;
+			margin: 20px auto;
+		}
+	</style>
+</head>
+<body>
+
+<h1>CKEditor 5 – classic build sample</h1>
+
+<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="../tests/manual/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>
+
+<script src="../build/ckeditor.js"></script>
+<script>
+	ClassicEditor.create( document.querySelector( '#editor' ) )
+		.then( editor => {
+			window.editor = editor;
+		} )
+		.catch( err => {
+			console.error( err.stack );
+		} );
+</script>
+
+</body>
+</html>

+ 149 - 0
packages/ckeditor5-build-classic/tests/ckeditor.js

@@ -0,0 +1,149 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals document */
+
+import { ClassicEditor } from '../ckeditor';
+import BaseClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic';
+
+describe( 'ClassicEditor', () => {
+	let editor, editorElement;
+
+	beforeEach( () => {
+		editorElement = document.createElement( 'div' );
+		editorElement.innerHTML = '<p><strong>foo</strong> bar</p>';
+
+		document.body.appendChild( editorElement );
+	} );
+
+	afterEach( () => {
+		editorElement.remove();
+	} );
+
+	describe( 'buid', () => {
+		it( 'contains plugins', () => {
+			expect( ClassicEditor.build.plugins ).to.not.be.empty;
+		} );
+
+		it( 'contains config', () => {
+			expect( ClassicEditor.build.config.toolbar ).to.not.be.empty;
+		} );
+	} );
+
+	describe( 'create()', () => {
+		beforeEach( () => {
+			return ClassicEditor.create( editorElement )
+				.then( newEditor => {
+					editor = newEditor;
+				} );
+		} );
+
+		afterEach( () => {
+			return editor.destroy();
+		} );
+
+		it( 'creates an instance which inherits from the ClassicEditor', () => {
+			expect( editor ).to.be.instanceof( ClassicEditor );
+			expect( editor ).to.be.instanceof( BaseClassicEditor );
+		} );
+
+		it( 'loads data from the editor element', () => {
+			expect( editor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
+		} );
+	} );
+
+	describe( 'destroy()', () => {
+		beforeEach( function () {
+			return ClassicEditor.create( editorElement )
+				.then( newEditor => {
+					editor = newEditor;
+				} );
+		} );
+
+		it( 'sets the data back to the editor element', () => {
+			editor.setData( '<p>foo</p>' );
+
+			return editor.destroy()
+				.then( () => {
+					expect( editorElement.innerHTML ).to.equal( '<p>foo</p>' );
+				} );
+		} );
+
+		it( 'restores the editor element', () => {
+			expect( editor.element.style.display ).to.equal( 'none' );
+
+			return editor.destroy()
+				.then( () => {
+					expect( editor.element.style.display ).to.equal( '' );
+				} );
+		} );
+	} );
+
+	describe( 'plugins', () => {
+		it( 'paragraph works', () => {
+			const data = '<p>Some text inside a paragraph.</p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'basic-styles work', () => {
+			const data = [
+				'<p>',
+				'<strong>Test:strong</strong>',
+				'<em>Test:em</em>',
+				'</p>'
+			].join( '' );
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'heading works', () => {
+			const data = [
+				'<h2>Heading 1.</h2>',
+				'<h3>Heading 1.1</h3>',
+				'<h4>Heading 1.1.1</h4>',
+				'<h4>Heading 1.1.2</h4>',
+				'<h3>Heading 1.2</h3>',
+				'<h4>Heading 1.2.1</h4>',
+				'<h2>Heading 2</h2>'
+			].join( '' );
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'image works', () => {
+			const data = '<figure class="image"><img src="./manual/sample.jpg"></figure>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'list works', () => {
+			const data = [
+				'<ul>',
+				'<li>Item 1.</li>',
+				'<li>Item 2.</li>',
+				'</ul>',
+				'<ol>',
+				'<li>Item 1.</li>',
+				'<li>Item 2.</li>',
+				'</ol>'
+			].join( '' );
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'link works', () => {
+			const data = '<p><a href="//ckeditor.com">CKEditor.com</a></p>';
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+	} )
+} );

+ 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 );
+	} );

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

@@ -0,0 +1,9 @@
+# CKEditor 5 classic build – standard version (CommonJS `require()`)
+
+Just play with it.
+
+**Note:** Remember to rebuild the bundles (`npm run build`). You can also run Webpack in the watch mode:
+
+```
+./node_modules/.bin/webpack -w
+```

+ 23 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.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.compat.js

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

+ 9 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.compat.md

@@ -0,0 +1,9 @@
+# CKEditor 5 classic build – compat (ES5) version
+
+Just play with it.
+
+**Note:** Remember to rebuild the bundles (`npm run build`). You can also run Webpack in the watch mode:
+
+```
+./node_modules/.bin/webpack -w --config=webpack.compat.config.js
+```

+ 23 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.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.js

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

+ 9 - 0
packages/ckeditor5-build-classic/tests/manual/ckeditor.md

@@ -0,0 +1,9 @@
+# CKEditor 5 classic build – standard version
+
+Just play with it.
+
+**Note:** Remember to rebuild the bundles (`npm run build`). You can also run Webpack in the watch mode:
+
+```
+./node_modules/.bin/webpack -w
+```

BIN
packages/ckeditor5-build-classic/tests/manual/sample.jpg


+ 73 - 0
packages/ckeditor5-build-classic/webpack.compat.config.js

@@ -0,0 +1,73 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+const path = require( 'path' );
+const webpack = require( 'webpack' );
+const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
+
+const BabiliPlugin = require( 'babili-webpack-plugin' );
+
+module.exports = {
+	devtool: 'source-map',
+
+	entry: [
+		require.resolve( 'regenerator-runtime/runtime.js' ),
+		path.resolve( __dirname, 'ckeditor.js' )
+	],
+
+	output: {
+		path: path.resolve( __dirname, 'build' ),
+		filename: 'ckeditor.compat.js',
+		libraryTarget: 'umd'
+	},
+
+	plugins: [
+		new BabiliPlugin( null, {
+			comments: false
+		} ),
+		new webpack.BannerPlugin( {
+			banner: bundler.getLicenseBanner(),
+			raw: true
+		} )
+	],
+
+	module: {
+		rules: [
+			{
+				test: /\.js$/,
+				use: [
+					{
+						loader: 'babel-loader',
+						query: {
+							presets: [
+								[
+									require( 'babel-preset-env' ),
+									{
+										targets: {
+											browsers: [
+												'last 2 versions',
+												'ie >= 11'
+											]
+										}
+									}
+								]
+							]
+						}
+					}
+				]
+			},
+			{
+				test: /\.svg$/,
+				use: [ 'raw-loader' ]
+			},
+			{
+				test: /\.scss$/,
+				use: [ 'style-loader', 'css-loader', 'sass-loader' ]
+			}
+		]
+	}
+};

+ 47 - 0
packages/ckeditor5-build-classic/webpack.config.js

@@ -0,0 +1,47 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+const path = require( 'path' );
+const webpack = require( 'webpack' );
+const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
+
+const BabiliPlugin = require( 'babili-webpack-plugin' );
+
+module.exports = {
+	devtool: 'source-map',
+
+	entry: path.resolve( __dirname, 'ckeditor.js' ),
+
+	output: {
+		path: path.resolve( __dirname, 'build' ),
+		filename: 'ckeditor.js',
+		libraryTarget: 'umd'
+	},
+
+	plugins: [
+		new BabiliPlugin( null, {
+			comments: false
+		} ),
+		new webpack.BannerPlugin( {
+			banner: bundler.getLicenseBanner(),
+			raw: true
+		} )
+	],
+
+	module: {
+		rules: [
+			{
+				test: /\.svg$/,
+				use: [ 'raw-loader' ]
+			},
+			{
+				test: /\.scss$/,
+				use: [ 'style-loader', 'css-loader', 'sass-loader' ]
+			}
+		]
+	}
+};