Sfoglia il codice sorgente

Docs: Extended the Builds/Advanced Setup guide with an additional snippet.

Aleksander Nowodzinski 7 anni fa
parent
commit
0a5b555b54

+ 14 - 0
docs/builds/guides/integration/advanced-setup.md

@@ -220,6 +220,20 @@ ClassicEditor.build = {
 
 This module will export an editor creator class which has all the plugins and configuration that you need already built-in. To use such editor, simply import that class and call the static `.create()` method like in all {@link builds/guides/integration/basic-api#Creating-an-editor examples}.
 
+```js
+import ClassicEditor from './ckeditor';
+
+ClassicEditor
+	// Note that you don't have to specify the plugin and toolbar configuraiton — using defaults from the build.
+	.create( document.querySelector( '#editor' ) )
+	.then( editor => {
+		console.log( 'Editor was initialized', editor );
+	} )
+	.catch( error => {
+		console.error( error.stack );
+	} );
+```
+
 ### Running the editor – method 2
 
 The second variant how to run the editor is to use the creator class directly, without creating an intermediary subclass. The above code would translate to:

+ 1 - 1
docs/framework/guides/quick-start.md

@@ -26,7 +26,7 @@ First, install packages needed to build CKEditor 5.
 
 ```bash
 npm install --save \
-	postcss-loader  \
+	postcss-loader \
 	raw-loader \
 	style-loader \
 	webpack