Przeglądaj źródła

Docs: Improved editors and builds docs.

Piotrek Koszuliński 8 lat temu
rodzic
commit
deee76103b

+ 1 - 1
packages/ckeditor5-editor-balloon/LICENSE.md

@@ -1,7 +1,7 @@
 Software License Agreement
 ==========================
 
-**Balloon Toolbar Editor** – https://github.com/ckeditor/ckeditor5-editor-balloon <br>
+**Balloon Editor** – https://github.com/ckeditor/ckeditor5-editor-balloon <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:

+ 6 - 2
packages/ckeditor5-editor-balloon/README.md

@@ -1,4 +1,4 @@
-CKEditor 5 balloon editor creator
+CKEditor 5 balloon editor implementation
 =========================================
 
 [![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)
@@ -8,7 +8,11 @@ CKEditor 5 balloon editor creator
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-balloon/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-balloon?type=dev)
 
-The balloon editor (Medium-like) implementation. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-editor-balloon>.
+The balloon editor implementation (Medium-like editor).
+
+This package exposes the [`BallonEditor`](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/module_editor-balloon_ballooneditor-BallonEditor.html) class. Follow there to learn more about this type of editor and how to initialize it.
+
+This package contains the source version of the balloon editor. This editor implementation is also available in the [balloon build](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-balloon). Read more about [CKEditor 5 Builds](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/index.html).
 
 ## License
 

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

@@ -1,7 +1,7 @@
 {
   "name": "@ckeditor/ckeditor5-editor-balloon",
   "version": "0.1.0",
-  "description": "Balloon editor for CKEditor 5.",
+  "description": "The balloon editor implementation for CKEditor 5.",
   "keywords": [],
   "dependencies": {
     "@ckeditor/ckeditor5-core": "^0.9.0",

+ 28 - 10
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -17,23 +17,40 @@ import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement
 import '../theme/theme.scss';
 
 /**
- * {@glink builds/guides/overview#Balloon-editor Balloon editor} - Uses an inline editable and a toolbar based
- * on the {@link module:ui/toolbar/contextual/contextualtoolbar~ContextualToolbar}.
+ * The {@glink builds/guides/overview#Balloon-editor balloon editor} implementation (Medium-like editor).
+ * It uses an inline editable and a toolbar based on the {@link module:ui/toolbar/contextual/contextualtoolbar~ContextualToolbar}.
+ * See the {@glink examples/builds/balloon-editor demo}.
  *
- * In order to create a Balloon editor, use the
+ * In order to create a balloon editor instance, use the static
  * {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method.
  *
+ * # Balloon editor and balloon build
+ *
+ * The balloon editor can be used directly from source (if you installed the
+ * [`@ckeditor/ckeditor5-editor-balloon`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-balloon) package)
+ * but it is also available in the {@glink builds/guides/overview#Balloon-editor balloon build}.
+ *
+ * {@glink builds/guides/overview Builds} are ready-to-use editors with plugins bundled in. When using the editor from
+ * source you need to take care of loading all plugins by yourself
+ * (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).
+ * Using the editor from source gives much better flexibility and allows easier customization.
+ *
+ * Read more about initializing the editor from source or as a build in
+ * {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`}.
+ *
  * @extends module:core/editor/standardeditor~StandardEditor
  */
 export default class BalloonEditor extends StandardEditor {
 	/**
 	 * Creates an instance of the balloon editor.
 	 *
-	 * <strong>Note:</strong> do not use the constructor to create editor instances. Use static
-	 * {@link module:editor-balloon/ballooneditor~BalloonEditor#create BalloonEditor.create()} method instead.
+	 * **Note:** do not use the constructor to create editor instances. Use the static
+	 * {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method instead.
 	 *
-	 * @param {HTMLElement} element The DOM element that will be the source for the created editor.
-	 * @param {Object} config The editor configuration.
+	 * @protected
+	 * @param {HTMLElement} element The DOM element that will be the source for the created editor
+	 * (on which the editor will be initialized).
+	 * @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration.
 	 */
 	constructor( element, config ) {
 		super( element, config );
@@ -98,10 +115,11 @@ export default class BalloonEditor extends StandardEditor {
 	 *				console.error( err.stack );
 	 *			} );
 	 *
-	 * @param {HTMLElement} element See {@link #constructor}'s parameters.
-	 * @param {Object} config See {@link #constructor}'s parameters.
+	 * @param {HTMLElement} element The DOM element that will be the source for the created editor
+	 * (on which the editor will be initialized).
+	 * @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration.
 	 * @returns {Promise} A promise resolved once the editor is ready.
-	 * @returns {module:core/editor/standardeditor~StandardEditor} return.editor The editor instance.
+	 * The promise returns the created {@link module:editor-balloon/ballooneditor~BalloonEditor} instance.
 	 */
 	static create( element, config ) {
 		return new Promise( resolve => {