浏览代码

Merge branch 'master' into t/ckeditor5/1655

Kamil Piechaczek 6 年之前
父节点
当前提交
0e2f4c3eb0

+ 1 - 1
packages/ckeditor5-editor-balloon/.eslintrc.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* eslint-env node */
 /* eslint-env node */

+ 1 - 5
packages/ckeditor5-editor-balloon/.travis.yml

@@ -1,12 +1,8 @@
 sudo: required
 sudo: required
 dist: trusty
 dist: trusty
 addons:
 addons:
+  chrome: stable
   firefox: latest
   firefox: latest
-  apt:
-    sources:
-    - google-chrome
-    packages:
-    - google-chrome-stable
 language: node_js
 language: node_js
 node_js:
 node_js:
 - '8'
 - '8'

+ 7 - 0
packages/ckeditor5-editor-balloon/CHANGELOG.md

@@ -1,6 +1,13 @@
 Changelog
 Changelog
 =========
 =========
 
 
+## [12.1.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v12.0.0...v12.1.0) (2019-04-10)
+
+### Features
+
+* Introduced `EditorConfig#initialData`. ([678528f](https://github.com/ckeditor/ckeditor5-editor-balloon/commit/678528f))
+
+
 ## [12.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.2...v12.0.0) (2019-02-28)
 ## [12.0.0](https://github.com/ckeditor/ckeditor5-editor-balloon/compare/v11.0.2...v12.0.0) (2019-02-28)
 
 
 ### Features
 ### Features

+ 11 - 11
packages/ckeditor5-editor-balloon/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@ckeditor/ckeditor5-editor-balloon",
   "name": "@ckeditor/ckeditor5-editor-balloon",
-  "version": "12.0.0",
+  "version": "12.1.0",
   "description": "Balloon editor implementation for CKEditor 5.",
   "description": "Balloon editor implementation for CKEditor 5.",
   "keywords": [
   "keywords": [
     "ckeditor",
     "ckeditor",
@@ -9,19 +9,19 @@
     "ckeditor5-editor"
     "ckeditor5-editor"
   ],
   ],
   "dependencies": {
   "dependencies": {
-    "@ckeditor/ckeditor5-core": "^12.0.0",
-    "@ckeditor/ckeditor5-engine": "^13.0.0",
-    "@ckeditor/ckeditor5-ui": "^12.0.0",
-    "@ckeditor/ckeditor5-utils": "^12.0.0",
+    "@ckeditor/ckeditor5-core": "^12.1.0",
+    "@ckeditor/ckeditor5-engine": "^13.1.0",
+    "@ckeditor/ckeditor5-ui": "^12.1.0",
+    "@ckeditor/ckeditor5-utils": "^12.1.0",
     "lodash-es": "^4.17.10"
     "lodash-es": "^4.17.10"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@ckeditor/ckeditor5-basic-styles": "^11.0.0",
-    "@ckeditor/ckeditor5-enter": "^11.0.0",
-    "@ckeditor/ckeditor5-heading": "^11.0.0",
-    "@ckeditor/ckeditor5-paragraph": "^11.0.0",
-    "@ckeditor/ckeditor5-typing": "^12.0.0",
-    "@ckeditor/ckeditor5-undo": "^11.0.0",
+    "@ckeditor/ckeditor5-basic-styles": "^11.1.0",
+    "@ckeditor/ckeditor5-enter": "^11.0.1",
+    "@ckeditor/ckeditor5-heading": "^11.0.1",
+    "@ckeditor/ckeditor5-paragraph": "^11.0.1",
+    "@ckeditor/ckeditor5-typing": "^12.0.1",
+    "@ckeditor/ckeditor5-undo": "^11.0.1",
     "eslint": "^5.5.0",
     "eslint": "^5.5.0",
     "eslint-config-ckeditor5": "^1.0.11",
     "eslint-config-ckeditor5": "^1.0.11",
     "husky": "^1.3.1",
     "husky": "^1.3.1",

+ 26 - 6
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /**
 /**
@@ -107,9 +107,11 @@ export default class BalloonEditor extends Editor {
 	}
 	}
 
 
 	/**
 	/**
-	 * Creates a `BalloonEditor` instance.
+	 * Creates a new balloon editor instance.
 	 *
 	 *
-	 * There are two general ways how the editor can be initialized.
+	 * There are three general ways how the editor can be initialized.
+	 *
+	 * # Using an existing DOM element (and loading data from it)
 	 *
 	 *
 	 * You can initialize the editor using an existing DOM element:
 	 * You can initialize the editor using an existing DOM element:
 	 *
 	 *
@@ -124,7 +126,9 @@ export default class BalloonEditor extends Editor {
 	 *
 	 *
 	 * The element's content will be used as the editor data and the element will become the editable element.
 	 * The element's content will be used as the editor data and the element will become the editable element.
 	 *
 	 *
-	 * Alternatively, you can initialize the editor by passing the initial data directly as a `String`.
+	 * # Creating a detached editor
+	 *
+	 * Alternatively, you can initialize the editor by passing the initial data directly as a string.
 	 * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:
 	 * In this case, the editor will render an element that must be inserted into the DOM for the editor to work properly:
 	 *
 	 *
 	 *		BalloonEditor
 	 *		BalloonEditor
@@ -142,6 +146,8 @@ export default class BalloonEditor extends Editor {
 	 * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
 	 * This lets you dynamically append the editor to your web page whenever it is convenient for you. You may use this method if your
 	 * web page content is generated on the client-side and the DOM structure is not ready at the moment when you initialize the editor.
 	 * web page content is generated on the client-side and the DOM structure is not ready at the moment when you initialize the editor.
 	 *
 	 *
+	 * # Using an existing DOM element (and data provided in `config.initialData`)
+	 *
 	 * You can also mix those two ways by providing a DOM element to be used and passing the initial data through the config:
 	 * You can also mix those two ways by providing a DOM element to be used and passing the initial data through the config:
 	 *
 	 *
 	 *		BalloonEditor
 	 *		BalloonEditor
@@ -160,9 +166,22 @@ export default class BalloonEditor extends Editor {
 	 *
 	 *
 	 * Note that an error will be thrown if you pass initial data both as the first parameter and also in the config.
 	 * Note that an error will be thrown if you pass initial data both as the first parameter and also in the config.
 	 *
 	 *
-	 * See also the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
+	 * # Configuring the editor
+	 *
+	 * See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
 	 * customizing plugins, toolbar and other.
 	 * customizing plugins, toolbar and other.
 	 *
 	 *
+	 * # Using the editor from source
+	 *
+	 * The code samples listed in the previous sections of this documentation assume that you are using an
+	 * {@glink builds/guides/overview editor build} (for example – `@ckeditor/ckeditor5-build-balloon`).
+	 *
+	 * If you want to use the balloon editor from source (`@ckeditor/ckeditor5-editor-balloon/src/ballooneditor`),
+	 * then you need to define the list of
+	 * {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
+	 * {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from
+	 * source in the {@glink builds/guides/integration/advanced-setup "Advanced setup" guide}.
+	 *
 	 * @param {HTMLElement|String} sourceElementOrData The DOM element that will be the source for the created editor
 	 * @param {HTMLElement|String} sourceElementOrData The DOM element that will be the source for the created editor
 	 * or the editor's initial data.
 	 * or the editor's initial data.
 	 *
 	 *
@@ -186,9 +205,10 @@ export default class BalloonEditor extends Editor {
 					} )
 					} )
 					.then( () => {
 					.then( () => {
 						if ( !isElement( sourceElementOrData ) && config.initialData ) {
 						if ( !isElement( sourceElementOrData ) && config.initialData ) {
+							// Documented in core/editor/editorconfig.jdoc.
 							throw new CKEditorError(
 							throw new CKEditorError(
 								'editor-create-initial-data: ' +
 								'editor-create-initial-data: ' +
-								'EditorConfig#initialData cannot be used together with initial data passed in Editor#create()'
+								'The config.initialData option cannot be used together with initial data passed in Editor.create().'
 							);
 							);
 						}
 						}
 
 

+ 1 - 1
packages/ckeditor5-editor-balloon/src/ballooneditorui.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /**
 /**

+ 1 - 1
packages/ckeditor5-editor-balloon/src/ballooneditoruiview.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /**
 /**

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/ballooneditor.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals document, Event */
 /* globals document, Event */

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/ballooneditorui.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals document, Event */
 /* globals document, Event */

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/ballooneditoruiview.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 import EditingView from '@ckeditor/ckeditor5-engine/src/view/view';
 import EditingView from '@ckeditor/ckeditor5-engine/src/view/view';

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/manual/ballooneditor-data.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals console:false, document, window */
 /* globals console:false, document, window */

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/manual/ballooneditor.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals console:false, document, window */
 /* globals console:false, document, window */

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/manual/memory.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals console:false, document, window */
 /* globals console:false, document, window */

+ 1 - 1
packages/ckeditor5-editor-balloon/tests/manual/placeholder.js

@@ -1,6 +1,6 @@
 /**
 /**
  * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
  */
 
 
 /* globals console:false, document, window */
 /* globals console:false, document, window */