浏览代码

Docs: Improved editors and builds docs.

Piotrek Koszuliński 8 年之前
父节点
当前提交
2ebf087fe2

+ 5 - 1
packages/ckeditor5-editor-inline/README.md

@@ -8,7 +8,11 @@ CKEditor 5 inline editor creator
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-inline/status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-inline)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-editor-inline/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-editor-inline?type=dev)
 
-The inline editor implementation. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-editor-inline>.
+The inline editor implementation.
+
+This package exposes the [`InlineEditor`](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/module_editor-inline_inlineeditor-InlineEditor.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 inline editor. This editor implementation is also available in the [inline build](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-inline). Read more about [CKEditor 5 Builds](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/index.html).
 
 ## License
 

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

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

+ 29 - 10
packages/ckeditor5-editor-inline/src/inlineeditor.js

@@ -16,10 +16,26 @@ import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement
 import '../theme/theme.scss';
 
 /**
- * {@glink builds/guides/overview#Inline-editor Inline editor} - uses an inline editable and a floating toolbar.
+ * The {@glink builds/guides/overview#Inline-editor inline editor} implementation.
+ * It uses an inline editable and a floating toolbar.
+ * See the {@glink examples/builds/inline-editor demo}.
  *
- *  In order to create an Inline editor, use the
- * {@link module:editor-inline/inlineeditor~InlineEditor#create InlineEditor.create()} method.
+ * In order to create a inline editor instance, use the static
+ * {@link module:editor-inline/inlineeditor~InlineEditor#create `InlineEditor.create()`} method.
+ *
+ * # Inline editor and inline build
+ *
+ * The inline editor can be used directly from source (if you installed the
+ * [`@ckeditor/ckeditor5-editor-inline`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-inline) package)
+ * but it is also available in the {@glink builds/guides/overview#Inline-editor inline 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-inline/inlineeditor~InlineEditor#create `InlineEditor.create()`}.
  *
  * @extends module:core/editor/standardeditor~StandardEditor
  */
@@ -27,11 +43,13 @@ export default class InlineEditor extends StandardEditor {
 	/**
 	 * Creates an instance of the inline editor.
 	 *
-	 * <strong>Note:</strong> do not use the constructor to create editor instances. Use static
+	 * **Note:** do not use the constructor to create editor instances. Use the static
 	 * {@link module:editor-inline/inlineeditor~InlineEditor#create `InlineEditor.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 );
@@ -60,7 +78,7 @@ export default class InlineEditor extends StandardEditor {
 	}
 
 	/**
-	 * Creates an inline editor instance.
+	 * Creates a inline editor instance.
 	 *
 	 * Creating instance when using {@glink builds/index CKEditor build}:
 	 *
@@ -93,10 +111,11 @@ export default class InlineEditor extends StandardEditor {
 	 *				console.error( err.stack );
 	 *			} );
 	 *
-	 * @param {HTMLElement} element See {@link module:editor-inline/inlineeditor~InlineEditor#constructor}'s parameters.
-	 * @param {Object} config See {@link module:editor-inline/inlineeditor~InlineEditor#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-inline/inlineeditor~InlineEditor} instance.
 	 */
 	static create( element, config ) {
 		return new Promise( resolve => {