Kaynağa Gözat

Implemented the balloon block build.

Aleksander Nowodzinski 7 yıl önce
ebeveyn
işleme
7d1e52395a
64 değiştirilmiş dosya ile 629 ekleme ve 0 silme
  1. 80 0
      packages/ckeditor5-build-balloon-block/README.md
  2. 6 0
      packages/ckeditor5-build-balloon-block/build/ckeditor.js
  3. 1 0
      packages/ckeditor5-build-balloon-block/build/ckeditor.js.map
  4. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ar.js
  5. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ast.js
  6. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/bg.js
  7. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ca.js
  8. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/cs.js
  9. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/da.js
  10. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/de-ch.js
  11. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/de.js
  12. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/el.js
  13. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/en-au.js
  14. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/eo.js
  15. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/es.js
  16. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/et.js
  17. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/eu.js
  18. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/fa.js
  19. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/fi.js
  20. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/fr.js
  21. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/gl.js
  22. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/gu.js
  23. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/he.js
  24. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/hr.js
  25. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/hu.js
  26. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/it.js
  27. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ja.js
  28. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/km.js
  29. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/kn.js
  30. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ko.js
  31. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ku.js
  32. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/lv.js
  33. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/nb.js
  34. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ne.js
  35. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/nl.js
  36. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/no.js
  37. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/oc.js
  38. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/pl.js
  39. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/pt-br.js
  40. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/pt.js
  41. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ro.js
  42. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ru.js
  43. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/si.js
  44. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/sk.js
  45. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/sq.js
  46. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/sv.js
  47. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/tr.js
  48. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/tt.js
  49. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/ug.js
  50. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/uk.js
  51. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/vi.js
  52. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/zh-cn.js
  53. 1 0
      packages/ckeditor5-build-balloon-block/build/translations/zh.js
  54. 41 0
      packages/ckeditor5-build-balloon-block/sample/index.html
  55. 98 0
      packages/ckeditor5-build-balloon-block/src/ckeditor.js
  56. 166 0
      packages/ckeditor5-build-balloon-block/tests/ckeditor.js
  57. 27 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor-cjs-version.html
  58. 14 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor-cjs-version.js
  59. 9 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor-cjs-version.md
  60. 27 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor.html
  61. 14 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor.js
  62. 9 0
      packages/ckeditor5-build-balloon-block/tests/manual/ckeditor.md
  63. BIN
      packages/ckeditor5-build-balloon-block/tests/manual/sample.jpg
  64. 87 0
      packages/ckeditor5-build-balloon-block/webpack.config.js

+ 80 - 0
packages/ckeditor5-build-balloon-block/README.md

@@ -1,2 +1,82 @@
 CKEditor 5 balloon block editor build
 ==============================================
+
+[![Join the chat at https://gitter.im/ckeditor/ckeditor5](https://badges.gitter.im/ckeditor/ckeditor5.svg)](https://gitter.im/ckeditor/ckeditor5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-build-balloon-block.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-balloon-block)
+[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-build-balloon-block/status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-balloon-block)
+[![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-build-balloon-block/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-balloon-block?type=dev)
+
+The balloon editor build for CKEditor 5. Read more about the [balloon editor build](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#balloon-block-editor) and see the [demo](https://ckeditor.com/docs/ckeditor5/latest/examples/builds/balloon-block-editor.html).
+
+![CKEditor 5 balloon editor build screenshot](https://c.cksource.com/a/1/img/npm/ckeditor5-build-balloon-block.png)
+
+## Documentation
+
+See:
+
+* [Installation](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installation.html) for how to install this package and what it contains.
+* [Basic API](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/basic-api.html) for how to create an editor and interact with it.
+* [Configuration](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/configuration.html) for how to configure the editor.
+* [Creating custom builds](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html) for how to customize the build (configure and rebuild the editor bundle).
+
+## Quick start
+
+First, install the build from npm:
+
+```bash
+npm install --save @ckeditor/ckeditor5-build-balloon-block
+```
+
+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-balloon-block/build/ckeditor.js"></script>
+<script>
+	BalloonBlockEditor
+		.create( document.querySelector( '#editor' ) )
+		.then( editor => {
+			window.editor = editor;
+		} )
+		.catch( err => {
+			console.error( err.stack );
+		} );
+</script>
+```
+
+Or in your JavaScript application:
+
+```js
+import BalloonEditor from '@ckeditor/ckeditor5-build-balloon-block';
+
+// Or using the CommonJS version:
+// const BalloonBlockEditor = require( '@ckeditor/ckeditor5-build-balloon-block' );
+
+BalloonBlockEditor
+	.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`). Read more in the [Advanced setup guide](https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/advanced-setup.html).
+
+**Note:** We recommend to adjust the position of the block toolbar button using CSS (see the example below) to your liking. By default, the block toolbar button will be attached directly to the boundary of the editable content area.
+
+```html
+<style>
+	/* Give the block toolbar button some space, moving it a few pixels away from the editable area. */
+	.ck.ck-block-toolbar-button {
+		transform: translateX( -10px );
+	}
+</style>
+```
+
+## License
+
+Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file.

Dosya farkı çok büyük olduğundan ihmal edildi
+ 6 - 0
packages/ckeditor5-build-balloon-block/build/ckeditor.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/ckeditor.js.map


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ar.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ast.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/bg.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ca.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/cs.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/da.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/de-ch.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/de.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/el.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/en-au.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/eo.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/es.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/et.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/eu.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/fa.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/fi.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/fr.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/gl.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/gu.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/he.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/hr.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/hu.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/it.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ja.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/km.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/kn.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ko.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ku.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/lv.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/nb.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ne.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/nl.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/no.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/oc.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/pl.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/pt-br.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/pt.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ro.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ru.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/si.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/sk.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/sq.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/sv.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/tr.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/tt.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/ug.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/uk.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/vi.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/zh-cn.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
packages/ckeditor5-build-balloon-block/build/translations/zh.js


+ 41 - 0
packages/ckeditor5-build-balloon-block/sample/index.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="utf-8">
+	<title>CKEditor 5 – balloon block editor build – development sample</title>
+	<style>
+		body {
+			max-width: 800px;
+			margin: 20px auto;
+		}
+	</style>
+</head>
+<body>
+
+<h1>CKEditor 5 – balloon block editor build – development sample</h1>
+
+<div id="editor">
+	<h2>Sample</h2>
+
+	<p>This is an instance of the <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#balloon-editor">balloon block editor build</a>.</p>
+
+	<figure class="image">
+		<img src="../tests/manual/sample.jpg" alt="Autumn fields" />
+	</figure>
+
+	<p>You can use this sample to validate whether your <a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>
+</div>
+
+<script src="../build/ckeditor.js"></script>
+<script>
+	BalloonBlockEditor.create( document.querySelector( '#editor' ) )
+		.then( editor => {
+			window.editor = editor;
+		} )
+		.catch( err => {
+			console.error( err.stack );
+		} );
+</script>
+
+</body>
+</html>

+ 98 - 0
packages/ckeditor5-build-balloon-block/src/ckeditor.js

@@ -0,0 +1,98 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+// The editor creator to use.
+import BalloonEditorBase from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
+
+import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
+import UploadAdapter from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter';
+import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
+import BlockToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/block/blocktoolbar.js';
+import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
+import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
+import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
+import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
+import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
+import Heading from '@ckeditor/ckeditor5-heading/src/heading';
+import Image from '@ckeditor/ckeditor5-image/src/image';
+import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption';
+import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle';
+import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar';
+import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload';
+import Link from '@ckeditor/ckeditor5-link/src/link';
+import List from '@ckeditor/ckeditor5-list/src/list';
+import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed';
+import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
+import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
+import Table from '@ckeditor/ckeditor5-table/src/table';
+import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar';
+
+export default class BalloonBlockEditor extends BalloonEditorBase {}
+
+// Plugins to include in the build.
+BalloonBlockEditor.builtinPlugins = [
+	Essentials,
+	UploadAdapter,
+	Autoformat,
+	BlockToolbar,
+	Bold,
+	Italic,
+	BlockQuote,
+	CKFinder,
+	EasyImage,
+	Heading,
+	Image,
+	ImageCaption,
+	ImageStyle,
+	ImageToolbar,
+	ImageUpload,
+	Link,
+	List,
+	MediaEmbed,
+	Paragraph,
+	PasteFromOffice,
+	Table,
+	TableToolbar
+];
+
+// Editor configuration.
+BalloonBlockEditor.defaultConfig = {
+	blockToolbar: [
+		'heading',
+		'|',
+		'bulletedList',
+		'numberedList',
+		'imageUpload',
+		'blockQuote',
+		'insertTable',
+		'mediaEmbed'
+	],
+	toolbar: {
+		items: [
+			'bold',
+			'italic',
+			'link',
+			'undo',
+			'redo'
+		]
+	},
+	image: {
+		toolbar: [
+			'imageStyle:full',
+			'imageStyle:side',
+			'|',
+			'imageTextAlternative'
+		]
+	},
+	table: {
+		contentToolbar: [
+			'tableColumn',
+			'tableRow',
+			'mergeTableCells'
+		]
+	},
+	// This value must be kept in sync with the language defined in webpack.config.js.
+	language: 'en'
+};

+ 166 - 0
packages/ckeditor5-build-balloon-block/tests/ckeditor.js

@@ -0,0 +1,166 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* globals document */
+
+import BalloonBlockEditor from '../src/ckeditor';
+import BaseBalloonEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor';
+
+describe( 'BalloonBlockEditor build', () => {
+	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( BalloonBlockEditor.builtinPlugins ).to.not.be.empty;
+		} );
+
+		it( 'contains config', () => {
+			expect( BalloonBlockEditor.defaultConfig.toolbar ).to.not.be.empty;
+		} );
+
+		it( 'contains block toolbar config', () => {
+			expect( BalloonBlockEditor.defaultConfig.blockToolbar ).to.not.be.empty;
+		} );
+	} );
+
+	describe( 'create()', () => {
+		beforeEach( () => {
+			return BalloonBlockEditor.create( editorElement )
+				.then( newEditor => {
+					editor = newEditor;
+				} );
+		} );
+
+		afterEach( () => {
+			return editor.destroy();
+		} );
+
+		it( 'creates an instance which inherits from the BalloonBlockEditor', () => {
+			expect( editor ).to.be.instanceof( BalloonBlockEditor );
+			expect( editor ).to.be.instanceof( BaseBalloonEditor );
+		} );
+
+		it( 'loads data from the editor element', () => {
+			expect( editor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
+		} );
+	} );
+
+	describe( 'destroy()', () => {
+		beforeEach( () => {
+			return BalloonBlockEditor.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>' );
+				} );
+		} );
+	} );
+
+	describe( 'plugins', () => {
+		beforeEach( () => {
+			return BalloonBlockEditor.create( editorElement )
+				.then( newEditor => {
+					editor = newEditor;
+				} );
+		} );
+
+		afterEach( () => {
+			return editor.destroy();
+		} );
+
+		it( 'block toolbar works', () => {
+			expect( editor.plugins.get( 'BlockToolbar' ) ).to.be.an( 'object' );
+		} );
+
+		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>',
+				'<i>Test:i</i>',
+				'</p>'
+			].join( '' );
+
+			editor.setData( data );
+			expect( editor.getData() ).to.equal( data );
+		} );
+
+		it( 'block-quote works', () => {
+			const data = '<blockquote><p>Quote</p></blockquote>';
+
+			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 );
+		} );
+	} );
+} );

+ 27 - 0
packages/ckeditor5-build-balloon-block/tests/manual/ckeditor-cjs-version.html

@@ -0,0 +1,27 @@
+<div id="editor">
+	<h2>About CKEditor&nbsp;5</h2>
+
+	<p>This is <a href="https://ckeditor.com">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>
+
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
+
+	<h3>Notes</h3>
+
+	<p><a href="https://ckeditor.com">CKEditor&nbsp;5</a> is <i>under heavy development</i> 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-balloon-block/tests/manual/ckeditor-cjs-version.js

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

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

@@ -0,0 +1,9 @@
+# CKEditor 5 balloon block editor 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
+```

+ 27 - 0
packages/ckeditor5-build-balloon-block/tests/manual/ckeditor.html

@@ -0,0 +1,27 @@
+<div id="editor">
+	<h2>About CKEditor&nbsp;5</h2>
+
+	<p>This is <a href="https://ckeditor.com">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>
+
+	<p>We explained this design choice in <a href="https://medium.com/content-uneditable/ckeditor-5-the-future-of-rich-text-editing-2b9300f9df2c">&ldquo;CKEditor 5: The future of rich text editing&ldquo;</a>:</p>
+
+	<blockquote><p>(…) we are changing our approach with CKEditor 5. We will no longer have only two solutions available, instead CKEditor will be seen as a framework for editing solutions. At the same time, we will be developing several out-of-the-box solutions based on it, which will be available to use in many different contexts. It will be a real “one size fits all” approach, from little requirements, to super advanced full featured applications.</p></blockquote>
+
+	<h3>Notes</h3>
+
+	<p><a href="https://ckeditor.com">CKEditor&nbsp;5</a> is <i>under heavy development</i> 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-balloon-block/tests/manual/ckeditor.js

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

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

@@ -0,0 +1,9 @@
+# CKEditor 5 balloon block editor 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-balloon-block/tests/manual/sample.jpg


+ 87 - 0
packages/ckeditor5-build-balloon-block/webpack.config.js

@@ -0,0 +1,87 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+'use strict';
+
+/* eslint-env node */
+
+const path = require( 'path' );
+const webpack = require( 'webpack' );
+const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
+const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
+const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
+
+module.exports = {
+	devtool: 'source-map',
+	performance: { hints: false },
+
+	entry: path.resolve( __dirname, 'src', 'ckeditor.js' ),
+
+	output: {
+		// The name under which the editor will be exported.
+		library: 'BalloonBlockEditor',
+
+		path: path.resolve( __dirname, 'build' ),
+		filename: 'ckeditor.js',
+		libraryTarget: 'umd',
+		libraryExport: 'default'
+	},
+
+	optimization: {
+		minimizer: [
+			new UglifyJsWebpackPlugin( {
+				sourceMap: true,
+				uglifyOptions: {
+					output: {
+						// Preserve CKEditor 5 license comments.
+						comments: /^!/
+					}
+				}
+			} )
+		]
+	},
+
+	plugins: [
+		new CKEditorWebpackPlugin( {
+			// UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format.
+			// When changing the built-in language, remember to also change it in the editor's configuration (src/ckeditor.js).
+			language: 'en',
+			additionalLanguages: 'all'
+		} ),
+		new webpack.BannerPlugin( {
+			banner: bundler.getLicenseBanner(),
+			raw: true
+		} )
+	],
+
+	module: {
+		rules: [
+			{
+				test: /\.svg$/,
+				use: [ 'raw-loader' ]
+			},
+			{
+				test: /\.css$/,
+				use: [
+					{
+						loader: 'style-loader',
+						options: {
+							singleton: true
+						}
+					},
+					{
+						loader: 'postcss-loader',
+						options: styles.getPostCssConfig( {
+							themeImporter: {
+								themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' )
+							},
+							minify: true
+						} )
+					},
+				]
+			}
+		]
+	}
+};