浏览代码

Docs: Integration guides corrected. [skip ci]

Anna Tomanek 8 年之前
父节点
当前提交
fd93caecf2

文件差异内容过多而无法显示
+ 23 - 23
docs/builds/guides/integration/advanced-setup.md


+ 17 - 17
docs/builds/guides/integration/basic-api.md

@@ -10,19 +10,19 @@ order: 20
 
 Each CKEditor 5 build provides a different class that handles the creation of editor instances:
 
-* Classic editor  {@link module:editor-classic/classiceditor~ClassicEditor}
-* Inline editor  {@link module:editor-inline/inlineeditor~InlineEditor}
-* Balloon editor  {@link module:editor-balloon/ballooneditor~BalloonEditor}
+* Classic editor – {@link module:editor-classic/classiceditor~ClassicEditor}
+* Inline editor – {@link module:editor-inline/inlineeditor~InlineEditor}
+* Balloon editor – {@link module:editor-balloon/ballooneditor~BalloonEditor}
 
 Most of the examples in the documentation use the `ClassicEditor` class, but things should work in a similar way with other builds.
 
 ## Creating an editor
 
-Regardless of chosen build, creating an editor is done using a static `create()` method.
+Regardless of the chosen build, creating an editor is done using the static `create()` method.
 
 ### Example – Classic editor
 
-In your HTML page add an element that CKEditor should replace:
+Add an element that CKEditor should replace to your HTML page:
 
 ```html
 <textarea name="content" id="editor">
@@ -30,7 +30,7 @@ In your HTML page add an element that CKEditor should replace:
 </textarea>
 ```
 
-Then call {@link module:editor-classic/classiceditor~ClassicEditor#create `ClassicEditor.create()`} to **replace** `<textarea>` with a {@link builds/guides/overview#Classic-editor Classic editor}:
+Then call {@link module:editor-classic/classiceditor~ClassicEditor#create `ClassicEditor.create()`} to **replace** the `<textarea>` element with a {@link builds/guides/overview#Classic-editor Classic editor}:
 
 ```js
 ClassicEditor
@@ -43,11 +43,11 @@ ClassicEditor
 	} );
 ```
 
-In the above case, the `<textarea>` element is hidden and replaced with an editor. The `<textarea>` data is used to initialize the editor content. A `<div>` element can be used in the same fashion.
+In this case the `<textarea>` element is hidden and replaced with an editor. The `<textarea>` data is used to initialize the editor content. A `<div>` element can be used in the same way.
 
 ### Example – Inline editor
 
-Similarly to the previous example, add an element where CKEditor should initialize:
+Similarly to the previous example, add an element where CKEditor should initialize to your page:
 
 ```html
 <div id="editor">
@@ -55,7 +55,7 @@ Similarly to the previous example, add an element where CKEditor should initiali
 </div>
 ```
 
-Then call {@link module:editor-inline/inlineeditor~InlineEditor#create `InlineEditor.create()`} to **attach** {@link builds/guides/overview#Inline-editor Inline editor} to a `<div>` element:
+Then call {@link module:editor-inline/inlineeditor~InlineEditor#create `InlineEditor.create()`} to **attach** {@link builds/guides/overview#Inline-editor Inline editor} to the `<div>` element:
 
 ```js
 InlineEditor
@@ -70,9 +70,9 @@ InlineEditor
 
 ### Example – Balloon editor
 
-The procedure is the same as for Inline editor, the only difference is that we will use {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`}.
+The procedure is the same as for Inline editor &mdash; the only difference is that you need to use the {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} method.
 
-Add an element where CKEditor should initialize (as with ):
+Add an element where CKEditor should initialize to your page:
 
 ```html
 <div id="editor">
@@ -80,7 +80,7 @@ Add an element where CKEditor should initialize (as with ):
 </div>
 ```
 
-Then call {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} to **attach** {@link builds/guides/overview#Balloon-editor Balloon editor} to a `<div>` element:
+Then call {@link module:editor-balloon/ballooneditor~BalloonEditor#create `BalloonEditor.create()`} to **attach** {@link builds/guides/overview#Balloon-editor Balloon editor} to the `<div>` element:
 
 ```js
 BalloonEditor
@@ -94,7 +94,7 @@ BalloonEditor
 ```
 
 <info-box tip>
-	Every editor class may accept different parameters in the `create()` method and may handle initialization differently. For instance, the classic editor will replace a given element with an editor, while the inline editor will use the given element to initialize the editor on it. See each editor's documentation to learn the details.
+	Every editor class may accept different parameters in the `create()` method and may handle the initialization differently. For instance, the classic editor will replace a given element with an editor, while the inline editor will use the given element to initialize the editor on it. See each editor's documentation to learn the details.
 
 	The interface of the editor class is not enforced either. Since different implementations of editors may vary heavily in terms of functionality, the editor class implementers have full freedom regarding the API. Therefore, the examples in this guide may not work with some editor classes.
 </info-box>
@@ -105,7 +105,7 @@ Once the editor is created, it is possible to interact with it through its API.
 
 ### Setting the editor data
 
-To replace the editor content with new data, just use the `setData` method:
+To replace the editor content with new data, use the `setData()` method:
 
 ```js
 editor.setData( '<p>Some text.</p>' );
@@ -113,7 +113,7 @@ editor.setData( '<p>Some text.</p>' );
 
 ### Getting the editor data
 
-If the editor content needs to be retrieved for any reason, like for sending it to the server through an Ajax call, simply use the `getData` method:
+If the editor content needs to be retrieved for any reason, like for sending it to the server through an Ajax call, use the `getData()` method:
 
 ```js
 const data = editor.getData();
@@ -121,7 +121,7 @@ const data = editor.getData();
 
 ### Destroying the editor
 
-In modern applications, it is common to create and remove elements from the page interactively through JavaScript. CKEditor instances should be destroyed in such cases by using the `destroy()` method:
+In modern applications, it is common to create and remove elements from the page interactively through JavaScript. In such cases CKEditor instances should be destroyed by using the `destroy()` method:
 
 ```js
 editor.destroy()
@@ -134,7 +134,7 @@ Once destroyed, resources used by the editor instance are released and the origi
 
 ## UMD support
 
-Because builds are distributed as [UMD modules](https://github.com/umdjs/umd), it is worth noting that editor classes can be retrieved in various ways:
+Because builds are distributed as [UMD modules](https://github.com/umdjs/umd), editor classes can be retrieved in various ways:
 
 * by a [CommonJS](http://wiki.commonjs.org/wiki/CommonJS)-compatible loader (e.g. [webpack](https://webpack.js.org) or [Browserify](http://browserify.org/)),
 * by [RequireJS](http://requirejs.org/) (or any other AMD library),

+ 3 - 3
docs/builds/guides/integration/configuration.md

@@ -1,6 +1,6 @@
 ---
 # Scope:
-# * Introduction on how to set configurations.
+# * Introduction to setting configurations.
 # * Introduction to the top and must-know configurations.
 # * Point where to find the list of configuration options.
 
@@ -35,7 +35,7 @@ As you can see, configurations are set by a simple JavaScript object passed to t
 
 Builds come with all features included in the distribution package enabled by default. They are defined as plugins for CKEditor.
 
-In some cases, you may need to have different editor setups in your application, all based on the same build. For that purpose, you need to control the plugins available in an editor at runtime.
+In some cases, you may need to have different editor setups in your application, all based on the same build. For that purpose, you need to control the plugins available in the editor at runtime.
 
 In the example below `Heading` and `Link` plugins are removed:
 
@@ -51,7 +51,7 @@ ClassicEditor
 	} );
 ```
 <info-box>
-Be careful when removing plugins using `config.removePlugins` from CKEditor builds. If removed plugins were providing toolbar buttons then the default toolbar configuration included in a build will become invalid. In such case provide the updated toolbar configuration as in the example above.
+Be careful when removing plugins using `config.removePlugins` from CKEditor builds. If removed plugins were providing toolbar buttons, the default toolbar configuration included in a build will become invalid. In such case you need to provide the updated toolbar configuration as in the example above.
 </info-box>
 
 ### List of plugins

+ 7 - 5
docs/builds/guides/integration/installation.md

@@ -16,7 +16,9 @@ There are several options to download CKEditor 5 builds:
 * [npm](#npm)
 * [Zip download](#Zip-download)
 
-For the list of available builds check the {@link builds/guides/overview#Available-builds Overview} page. Once you download the editor jump to the {@link builds/guides/integration/basic-api Basic API guide} to see how to create editors.
+For the list of available builds check the {@link builds/guides/overview#Available-builds Overview} page.
+
+After downloading the editor jump to the {@link builds/guides/integration/basic-api Basic API guide} to see how to create editors.
 
 ### CDN
 
@@ -44,9 +46,9 @@ CKEditor will then be available at `node_modules/ckeditor5-build-[name]/ckeditor
 This download method is not available yet.
 </info-box>
 
-Go to [CKEditor 5 builds download page](https://ckeditor.com/ckeditor5-builds/download) and download your preferred build. For example, you may download the `ckeditor5-build-classic-1.0.0.zip` file for the Classic editor build.
+Go to the [CKEditor 5 builds download page](https://ckeditor.com/ckeditor5-builds/download) and download your preferred build. For example, you may download the `ckeditor5-build-classic-1.0.0.zip` file for the Classic editor build.
 
-Extract the above `.zip` file into a dedicated directory inside your project. It is recommended to include the editor version in the directory name to ensure proper cache invalidation once a new version of CKEditor is installed.
+Extract the `.zip` file into a dedicated directory inside your project. It is recommended to include the editor version in the directory name to ensure proper cache invalidation once a new version of CKEditor is installed.
 
 ## Included files
 
@@ -54,7 +56,7 @@ TODO
 
 ## Loading the API
 
-Once downloaded and installed in your application, it is time to make the API available in your pages. For that purpose, it is enough to load the API entry point script:
+After downloading and installing a CKEditor 5 build in your application, it is time to make the editor API available in your pages. For that purpose, it is enough to load the API entry point script:
 
 ```html
 <script src="[ckeditor-build-path]/ckeditor.js"></script>
@@ -63,7 +65,7 @@ Once downloaded and installed in your application, it is time to make the API av
 Once the CKEditor script is loaded, you can {@link builds/guides/integration/basic-api use the API} to create editors in your page.
 
 <info-box>
-	The `build/ckeditor.js` file is generated in the [UMD format](https://github.com/umdjs/umd) so you can also import it to your application if you use CommonJS modules (like in Node.js) or AMD modules (like in Require.js). Read more in the {@link builds/guides/integration/basic-api#UMD-support Basic API guide}.
+	The `build/ckeditor.js` file is generated in the [UMD format](https://github.com/umdjs/umd) so you can also import it into your application if you use CommonJS modules (like in Node.js) or AMD modules (like in Require.js). Read more in the {@link builds/guides/integration/basic-api#UMD-support Basic API guide}.
 
 	Also, for a more advanced setup, you may wish to bundle the CKEditor script with other scripts used by your application. See {@linkTODO Bundling} for more information about it.
 </info-box>

+ 4 - 1
docs/builds/index.md

@@ -12,9 +12,12 @@ CKEditor 5 Builds are the fastest and easiest way to use CKEditor 5 in your appl
 ## Documentation 
 
  * {@link builds/guides/overview Guides} &ndash; Learn how to install, integrate and configure CKEditor 5 Builds. More complex aspects, like creating custom builds, are explained here, too.
- * {@link examples/index Examples} &ndash; Try live demos of all available builds.
  * {@link features/index Features} &ndash; Learn about some of the features included in CKEditor 5 Builds.
 
+## Examples
+
+Try {@link examples/index live demos} of all available builds.
+
 ## Contribute
 
 CKEditor is an Open Source project and your contribution is most welcome. Feel free to {@link builds/guides/reporting-issues report bugs} or improve the code on [GitHub](https://github.com/ckeditor/ckeditor5). Since CKEditor is localized, you can also help [to translate it](https://www.transifex.com/ckeditor/ckeditor5/). You do not need to be a programmer to contribute to the project!