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

Docs: Improved wording and fixed typos in the 'Getting and saving data' guide.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
3b11893d6f
1 измененных файлов с 14 добавлено и 14 удалено
  1. 14 14
      docs/builds/guides/integration/saving-data.md

+ 14 - 14
docs/builds/guides/integration/saving-data.md

@@ -11,7 +11,7 @@ CKEditor 5 allows you to retrieve and save the data to your server (or to your s
 
 ## Automatic integration with HTML forms
 
-This is the most classical way of integrating the editor. It is typically used in simpler CMSes, forums, comment sections, etc.
+This is the classical way of integrating the editor. It is typically used in simpler CMSes, forums, comment sections, etc.
 
 This approach is only available in the {@link builds/guides/overview#classic-editor Classic editor} and only if it was used to replace a `<textarea>` element:
 
@@ -42,9 +42,9 @@ This approach is only available in the {@link builds/guides/overview#classic-edi
 </html>
 ````
 
-The Classic editor will automatically update the value of the `<textarea>` element once the user will submit the form. You do not need any additional JavaScript code to sent the editor data to the server.
+The Classic editor will automatically update the value of the `<textarea>` element once the user submits the form. You do not need any additional JavaScript code to sent the editor data to the server.
 
-In your HTTP server, you can now read the editor data from the `content` variable of the POST request. For instance, in PHP, you can get them in this way:
+In your HTTP server, you can now read the editor data from the `content` variable of the POST request. For instance, in PHP, you can get them this way:
 
 ```php
 <?php
@@ -53,14 +53,14 @@ In your HTTP server, you can now read the editor data from the `content` variabl
 ```
 
 <info-box>
-	Please note that the replaced `<textarea>` element is updated automatically by CKEditor straight before submission. If you need to access the `<textarea>` value programatically with JavaScript (e.g. in the `onsubmit` handler to validate the entered data), there is a chance that the `<textarea>` element would still store the original data. In order to update the value of replaced `<textarea>` use the {@link module:editor-classic/classiceditor~ClassicEditor#updateSourceElement `editor.updateSourceElement()`} method.
+	Please note that the replaced `<textarea>` element is updated automatically by CKEditor straight before the submission. If you need to access the `<textarea>` value programmatically with JavaScript (e.g. in the `onsubmit` handler to validate the entered data), there is a chance that the `<textarea>` element would still store the original data. In order to update the value of replaced `<textarea>`, use the {@link module:editor-classic/classiceditor~ClassicEditor#updateSourceElement `editor.updateSourceElement()`} method.
 
 	If you need to get the actual data from CKEditor at any moment using JavaScript, use the {@link module:editor-classic/classiceditor~ClassicEditor#getData `editor.getData()`} method as described in the next section.
 </info-box>
 
 <!-- Hidden due to https://github.com/cksource/umberto/issues/558
 <info-box>
-	When you print the data from the database to a `<textarea>` element in an HTML page, then you need to encode them correctly. For instance, if you use PHP then a minimal solution would look like this:
+	When you print the data from the database to a `<textarea>` element in an HTML page, you need to encode them correctly. For instance, if you use PHP then a minimal solution would look like this:
 
 	```php
 	<?php
@@ -90,7 +90,7 @@ In your HTTP server, you can now read the editor data from the `content` variabl
 
 When you use AJAX requests instead of the classical integration with HTML forms, implement a single-page application or you use a different editor type than the Classic editor (and hence, you cannot use the previous method), you can retrieve the data from the editor by using the {@link module:editor-classic/classiceditor~ClassicEditor#getData `editor.getData()`} method.
 
-For that, you will need to store the reference to the `editor` because, unlike in CKEditor 4, there is no global `CKEDITOR.instances` property. You can do that in multiple ways, e.g. assigning the `editor` to a variable defined outside the `then()`'s callback:
+For that, you need to store the reference to the `editor` because, unlike in CKEditor 4, there is no global `CKEDITOR.instances` property. You can do that in multiple ways, e.g. assigning the `editor` to a variable defined outside the `then()`'s callback:
 
 ```js
 let editor;
@@ -117,7 +117,7 @@ document.querySelector( '#submit' ).addEventListener( 'click', () => {
 The {@link module:autosave/autosave~Autosave} allows you to automatically save the data (e.g. send it to the server) when needed (when the user changed the content).
 
 <info-box>
-	This plugin is not available in any of the builds by default so you need to {@link builds/guides/development/installing-plugins install it}.
+	This plugin is unavailable in any of the builds by default so you need to {@link builds/guides/development/installing-plugins install it}.
 </info-box>
 
 Assuming that you implemented a `saveData()` function which sends the data to your server and returns a promise which is resolved once the data is successfully saved, configuring the autosave feature is as simple as:
@@ -201,11 +201,11 @@ function displayStatus( editor ) {
 How to understand this demo:
 
 * The status indicator shows when the editor has some unsaved content or pending actions.
-	* If you would drop a big image into this editor you will see that it is busy during the entire period while the image is being uploaded.
-	* The editor is busy also when saving the content is in progress (the `save()`'s promise was not resolved).
-* The autosave feature will throttle changes so frequent changes (e.g. typing) are grouped in batches.
-* The autosave does not check itself whether the data really changed. It bases on changes in the model which, in special cases, may not be "visible" in the data. You can add such a check yourself if you would like to avoid sending the same data to the server twice in a row.
-* You will be asked whether you want to leave the page if an image is being uploaded or the data has not been saved successfully yet. You can test that by dropping a big image into the editor or changing the "HTTP server lag" to a high value (e.g. 9000ms) and typing something. Those actions will make the editor "busy" for a longer time – try leaving the page at that moments.
+	* If you drop a big image into this editor, you will see that it is busy during the entire period while the image is being uploaded.
+	* The editor is also busy when saving the content is in progress (the `save()`'s promise was not resolved).
+* The autosave feature has a throttling mechanism which groups frequent changes (e.g. typing) in batches.
+* The autosave itself does not check whether the data has really changed. It bases on changes in the model which, in special cases, may not be "visible" in the data. You can add such a check yourself if you would like to avoid sending the same data to the server twice in a row.
+* You will be asked whether you want to leave the page if an image is being uploaded or the data has not been saved successfully yet. You can test that by dropping a big image into the editor or changing the "HTTP server lag" to a high value (e.g. 9000ms) and typing something. Those actions will make the editor "busy" for a longer time – you can try leaving the page in the meanwhile.
 
 {@snippet builds/saving-data/autosave}
 
@@ -307,7 +307,7 @@ function updateStatus( editor ) {
 How to understand this demo:
 
 * The "Save" button becomes active when there are some changes to be saved.
-* The spinner is shown when the data is being sent to the server or there are any other pending actions (e.g. image being uploaded).
-* You will be asked whether you want to leave the page if an image is being uploaded or the data has not been saved successfully yet. You can test that by dropping a big image into the editor or changing the "HTTP server lag" to a high value (e.g. 9000ms) and clicking the "Save" button. Those actions will make the editor "busy" for a longer time – try leaving the page at that moments.
+* The button changes to "Saving..." when the data is being sent to the server or there are any other pending actions (e.g. image being uploaded).
+* You will be asked whether you want to leave the page if an image is being uploaded or the data has not been saved successfully yet. You can test that by dropping a big image into the editor or changing the "HTTP server lag" to a high value (e.g. 9000ms) and clicking the "Save" button. Those actions will make the editor "busy" for a longer time – try leaving the page in the meanwhile.
 
 {@snippet builds/saving-data/manualsave}