8
0
Просмотр исходного кода

Merge branch 'master' into t/ckeditor5/1636

Maciej Gołaszewski 6 лет назад
Родитель
Сommit
d53f918e01

+ 1 - 3
packages/ckeditor5-core/.travis.yml

@@ -28,6 +28,4 @@ after_script:
 - ckeditor5-dev-tests-notify-travis-status
 env:
   global:
-  - secure: uJiLhULzhBDdkuQrYW7k7H4l4HizyfCdnV9ORe2HXyNnWFnFfAhc2vD1FQ5182ldQXtUQMX51gM/YL5r1Sa2IO3EW/j0gyuznqYvM8KX4lU1hXUAap1ZHW7Zb/leVQfU76IH688rkGcpr2SwCG6/LglqunozwhyePuxBzH23whSrf5dGXjswnMUAjouavtm+YybPZY81uj181aFY7nbcWOCUkx7FGaIg5WqG27kkYuUCVDw977hlwSevL6K1AF1OMtfHTAt4NR2oRKtpcRsrBlVNFFCraVa+3E1DN/kcEMaNDFJ4737Zta6jK9irGdfOwvtt1t4Og2fWKtUNCix2Almjiu0t58miuHhZenB4xRm4kpnc5nzfu0x/Ur4R95OHbKMf/6Zvvd/2v4bHe0iFihZXB8qiXvqZwqVyXCH2pWzj+tFztwpvyfj+Z1k4LIuo3shbG9GlK8mSl0OfL9WdSR/g09NBRg1aJtEKsJreensTEO9esJ5dD7JksKo6VsESSAztN4v5xuavtPM+yT2g2vFWpwyY0/6/yxR8hlIo0//24t8be9Lm+G3k1f++Jc6ea8aFYUPF+O6kdZgqD0g2LoAp5e28CjXkMDoq/0l+Ab0obpaMjZlyEZ+S8X+8+kyICpyADmLTWP/Mwmik8ixzABgBz0903w4aExOl8mEi9ws=
-  - secure: tVEuv/7HAhriDudbEP0+30DvPV04pI3XoW3ibHDVdI7qhjtNH4AnYcqJOtI25wZTYr8hUquqkFNM7nl4sSoPPHEgdLL/c9U1bLkmTfQD4l+e6OPL8V2D9qStnSvswDMevtoCAVep+yKU7tDwL+ppNZeC9SX4xigo8MMC0qKhgx/q2CWIOlDVURFbFeEss+RI6nn1nxO+1kyyiZ1O0hyh5Xkn2u9h5ihV3SAeAHfZyv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BgZKrm62NWFItTIk1L7ZnUiUj+tZEyaD8HX0YMam2LJYlLo4BVWOU=
+  - secure: TEv7Uuc8Xcd+AaR8W+s7qt/synWT60kR8/8QNiqBmdFDYC3LNdoI48V8vh8rIbdtYk1u6Ur+6pBLDC1+gMyA6+oAY5SVKdiep7JgJUkYEygCtr4chyiatbZezuKmWs9GxJ8awhZGeFuKNt/jwyVxMqYHDQ1t0Mb4+AyYB60h6o0Mx8IQ4rnmVmcCe45NZNe24a2a2ao5IX3Y3INrdXKBZ780mfDQrCWRa404MZ3ZoVdVeKoEkX3OiuKnsiCDIcKu89IVLRW7mq1kw84G8npDNbddU8sGtS6RdfSZ61M1jp1yHNXi/2/tLQyE0N8UF3bYHy9GzqKC6D4VGLLykGgv+yd95y0arwMMdi2gfrg3nE2Zehu/kuTRwMSBMwkhScZAhixYOjX/AFGd7EAmt4/wfBrNNCs29lCiOUpR7wC1ZSNCMbVxkNlAoI1J/2MoBKALqLdBfYGcH1XwfIwx/w62dqiE/zlnDYgdBursnpa0sGXMau1xAA+5ud+oHwmKTkMjKeszQC5YaWLS+qtTX/y2TnePvbzO8yTJrLDt+8tVAWsbUrWe9Uk+zuLNFxhNVmBbaQD3hhkRIm/ElCQROIA7tGRRyksuG63m1GBWZU6tIeiK6fitdXpgb+UpIru+Qc0p48XAz68zdslJg/4N3wcFuacNNdVqA3ZWd2Rsp8LO7t4=

+ 0 - 1
packages/ckeditor5-core/README.md

@@ -4,7 +4,6 @@ CKEditor 5 core editor architecture
 [![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-core.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-core)
 [![Build Status](https://travis-ci.org/ckeditor/ckeditor5-core.svg?branch=master)](https://travis-ci.org/ckeditor/ckeditor5-core)
-[![BrowserStack Status](https://automate.browserstack.com/automate/badge.svg?badge_key=d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)](https://automate.browserstack.com/public-build/d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)
 [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-core/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-core?branch=master)
 <br>
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-core/status.svg)](https://david-dm.org/ckeditor/ckeditor5-core)

+ 16 - 0
packages/ckeditor5-core/src/editor/editor.js

@@ -312,6 +312,22 @@ mix( Editor, ObservableMixin );
  * @event destroy
  */
 
+/**
+ * This error is thrown when a user tries to use a `<textarea>` element to create a non-classic editor in it.
+ *
+ * Textarea element represents a plain-text and cannot be used as a editable root element with included CKEditor5.
+ * Content of an editor should be nicely present to the user and show him how it's going to looks like. Textarea element
+ * doesn't support such behavior.
+ *
+ * Only {@glink builds/guides/overview#classic-editor Classic Editor} has implemented a special system, which
+ * **replace** DOM element and load data from it
+ * ({@link module:editor-classic/classiceditor~ClassicEditor.create more information}). All other editors
+ * use an existing element, load data from it and make this element editable. Details about behaviour of each editor
+ * might be found in an associated description of a `create` method of each editor.
+ *
+ * @error editor-wrong-element
+ */
+
 /**
  * An array of plugins built into this editor class.
  * It is used in CKEditor 5 builds to provide a list of plugins which are later automatically initialized

+ 20 - 18
packages/ckeditor5-core/tests/plugin.js

@@ -6,33 +6,35 @@
 import Plugin from '../src/plugin';
 import Editor from '../src/editor/editor';
 
-let editor;
+describe( 'Plugin', () => {
+	let editor;
 
-before( () => {
-	editor = new Editor();
-} );
-
-describe( 'constructor()', () => {
-	it( 'should set the `editor` property', () => {
-		const plugin = new Plugin( editor );
-
-		expect( plugin ).to.have.property( 'editor' ).to.equal( editor );
+	beforeEach( () => {
+		editor = new Editor();
 	} );
 
-	describe( 'destroy()', () => {
-		it( 'should be defined', () => {
+	describe( 'constructor()', () => {
+		it( 'should set the `editor` property', () => {
 			const plugin = new Plugin( editor );
 
-			expect( plugin.destroy ).to.be.a( 'function' );
+			expect( plugin ).to.have.property( 'editor' ).to.equal( editor );
 		} );
 
-		it( 'should stop listening', () => {
-			const plugin = new Plugin( editor );
-			const stopListeningSpy = sinon.spy( plugin, 'stopListening' );
+		describe( 'destroy()', () => {
+			it( 'should be defined', () => {
+				const plugin = new Plugin( editor );
+
+				expect( plugin.destroy ).to.be.a( 'function' );
+			} );
+
+			it( 'should stop listening', () => {
+				const plugin = new Plugin( editor );
+				const stopListeningSpy = sinon.spy( plugin, 'stopListening' );
 
-			plugin.destroy();
+				plugin.destroy();
 
-			expect( stopListeningSpy.calledOnce ).to.equal( true );
+				expect( stopListeningSpy.calledOnce ).to.equal( true );
+			} );
 		} );
 	} );
 } );