Sfoglia il codice sorgente

Merge branch 'master' into t/ckeditor5-dev/289

Piotrek Koszuliński 8 anni fa
parent
commit
d0264e9788

+ 19 - 0
.github/ISSUE_TEMPLATE.md

@@ -0,0 +1,19 @@
+## 🐞 Is this a bug report or feature request? (choose one)
+
+- Bug report
+- Feature request
+
+## 💻 Version of CKEditor
+
+<!-- Please specify CKEditor version, build type and all customizations. -->
+
+## 📋 Steps to reproduce
+
+1.
+2.
+
+## ✅ Expected result
+
+## ❎ Actual result
+
+## 📃 Other details that might be useful

+ 1 - 1
.travis.yml

@@ -22,7 +22,7 @@ script:
   - npm t
   - gulp docs:api --validate-only
 after_success:
-  - ./node_modules/.bin/ckeditor5-dev-docs-publish-nightly
+  - travis_wait ./node_modules/.bin/ckeditor5-dev-docs-publish-nightly
 notifications:
   slack:
     rooms:

+ 10 - 10
docs/_snippets/examples/balloon-editor.js

@@ -6,17 +6,17 @@
 /* globals console, window, document */
 
 import BalloonEditor from '@ckeditor/ckeditor5-build-balloon/src/ckeditor';
-import getToken from '@ckeditor/ckeditor5-easy-image/tests/_utils/gettoken';
 
-getToken()
-	.then( token => {
-		return BalloonEditor
-			.create( document.querySelector( '#snippet-balloon-editor' ), {
-				cloudServices: { token }
-			} )
-			.then( editor => {
-				window.editor = editor;
-			} );
+import { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
+
+BalloonEditor
+	.create( document.querySelector( '#snippet-balloon-editor' ), {
+		cloudServices: {
+			tokenUrl: TOKEN_URL
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
 	} )
 	.catch( err => {
 		console.error( err );

+ 12 - 13
docs/_snippets/examples/classic-editor.js

@@ -5,20 +5,19 @@
 
 /* globals ClassicEditor, console, window, document */
 
-import getToken from '@ckeditor/ckeditor5-easy-image/tests/_utils/gettoken';
+import { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
 
-getToken()
-	.then( token => {
-		return ClassicEditor
-			.create( document.querySelector( '#snippet-classic-editor' ), {
-				cloudServices: { token },
-				toolbar: {
-					viewportTopOffset: 60
-				}
-			} )
-			.then( editor => {
-				window.editor = editor;
-			} );
+ClassicEditor
+	.create( document.querySelector( '#snippet-classic-editor' ), {
+		cloudServices: {
+			tokenUrl: TOKEN_URL
+		},
+		toolbar: {
+			viewportTopOffset: 60
+		}
+	} )
+	.then( editor => {
+		window.editor = editor;
 	} )
 	.catch( err => {
 		console.error( err );

+ 8 - 10
docs/_snippets/examples/inline-editor.js

@@ -6,7 +6,7 @@
 /* globals console, window, document */
 
 import InlineEditor from '@ckeditor/ckeditor5-build-inline/src/ckeditor';
-import getToken from '@ckeditor/ckeditor5-easy-image/tests/_utils/gettoken';
+import { TOKEN_URL } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
 
 const inlineInjectElements = document.querySelectorAll( '#snippet-inline-editor [data-inline-inject]' );
 
@@ -18,6 +18,9 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
 		},
 		toolbar: {
 			viewportTopOffset: 60
+		},
+		cloudServices: {
+			tokenUrl: TOKEN_URL
 		}
 	};
 
@@ -36,15 +39,10 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
 		config.toolbar.items = [ 'headings', 'bold', 'italic', 'link' ];
 	}
 
-	getToken()
-		.then( token => {
-			config.cloudServices = { token };
-
-			return InlineEditor
-				.create( inlineElement, config )
-				.then( editor => {
-					window.editor = editor;
-				} );
+	InlineEditor
+		.create( inlineElement, config )
+		.then( editor => {
+			window.editor = editor;
 		} )
 		.catch( err => {
 			console.error( err );

+ 1 - 1
docs/features/image-upload.md

@@ -50,7 +50,7 @@ To make enabling image upload in CKEditor 5 a breeze, by default all builds incl
 	ClassicCreator
 		.create( document.querySelector( '#editor' ), {
 			cloudServices: {
-				token: 'token-retrieved-from-the-cs-token-server'
+				tokenUrl: 'http://url-to-retrieve-token.example.com/'
 			}
 		} )
 		.then( ... )

+ 6 - 6
docs/framework/guides/architecture/intro.md

@@ -383,7 +383,7 @@ class SampleInputView extends View {
 			placeholder: ''
 		} );
 
-		this.template = new Template( {
+		this.setTemplate( {
 			tag: 'input',
 			attributes: {
 				class: [
@@ -422,7 +422,7 @@ class ParentView extends View {
 		const childA = new SampleInputView( locale );
 		const childB = new SampleInputView( locale );
 
-		this.template = new Template( {
+		this.setTemplate( {
 			tag: 'div',
 			children: [
 				childA
@@ -434,18 +434,18 @@ class ParentView extends View {
 
 const parent = new ParentView( locale );
 
-parent.init();
+parent.render();
 
 // Will insert <div><input .. /><input .. /></div>.
 document.body.appendChild( parent.element );
 ```
 
-It is also possible to create standalone views that do not belong to any collection. They must be {@link module:ui/view~View#init initialized} before  injection into DOM:
+It is also possible to create standalone views that do not belong to any collection. They must be {@link module:ui/view~View#render rendered} before  injection into DOM:
 
 ```js
 const view = new SampleInputView( locale );
 
-view.init();
+view.render();
 
 // Will insert <input class="foo" type="text" placeholder="" />
 document.body.appendChild( view.element );
@@ -625,7 +625,7 @@ toolbar.items.add( buttonBar );
 The toolbar can now join the [UI tree](##View-collections-and-the-UI-tree) or it can be injected straight into DOM. To keep the example simple, proceed with the latter scenario:
 
 ```js
-toolbar.init();
+toolbar.render();
 
 document.body.appendChild( toolbar.element );
 ```

+ 1 - 1
docs/index.md

@@ -7,7 +7,7 @@ sitenav: false
 
 <dl><dt>{@link builds/guides/overview CKEditor 5 Builds documentation}</dt><dd>Learn how to install, integrate and configure CKEditor 5 Builds. More complex aspects, like creating custom builds, are explained here, too.</dd>
 <dt>{@link framework/guides/overview CKEditor 5 Framework documentation}</dt><dd>Learn how to work with CKEditor 5 Framework, customize it, create your own plugins and custom editors, change the UI or even bring your own UI to the editor.</dd>
-<dt>{@link examples/index CKEditor 5 Examples}<dt><dd>Try out all CKEditor 5 Builds. See some of the possible customizations of CKEditor.</dd>
+<dt>{@link examples/index CKEditor 5 Examples}</dt><dd>Try out all CKEditor 5 Builds. See some of the possible customizations of CKEditor.</dd>
 <dt>{@link features/index CKEditor 5 Features}</dt><dd>Learn about selected features included in CKEditor 5 Builds.</dd>
 <dt>{@link api/index CKEditor 5 API Reference}</dt><dd>A complete API documentation.</dd></dl>
 

+ 29 - 4
docs/umberto.json

@@ -11,10 +11,35 @@
 	"docsearch": {
 		"apiKey": "fc463c26455365ad403d5ec51796cd73",
 		"indexName": "ckeditor_nightly",
-		"importants": [
-			"module:editor-balloon/ballooneditor~BalloonEditor.create",
-			"module:editor-classic/classiceditor~ClassicEditor.create",
-			"module:editor-inline/inlineeditor~InlineEditor.create"
+		"customRanking": [
+			{
+				"url": "api/module_core_editor_editorconfig-EditorConfig.html",
+				"rank": 10
+			},
+			{
+				"url": "api/module_heading_heading-HeadingConfig.html",
+				"rank": 7
+			},
+			{
+				"url": "api/module_image_image-ImageConfig.html",
+				"rank": 7
+			},
+			{
+				"url": "api/module_editor-classic_classiceditor-ClassicEditor.html",
+				"rank": 5
+			},
+			{
+				"url": "api/module_editor-balloon_ballooneditor-BalloonEditor.html",
+				"rank": 5
+			},
+			{
+				"url": "api/module_editor-inline_inlineeditor-InlineEditor.html",
+				"rank": 5
+			},
+			{
+				"url": "api/module_utils_config.html",
+				"rank": -5
+			}
 		]
 	},
 	"googleanalytics": {

+ 1 - 0
mgit.json

@@ -10,6 +10,7 @@
     "@ckeditor/ckeditor5-build-classic": "ckeditor/ckeditor5-build-classic",
     "@ckeditor/ckeditor5-build-inline": "ckeditor/ckeditor5-build-inline",
     "@ckeditor/ckeditor5-clipboard": "ckeditor/ckeditor5-clipboard",
+    "@ckeditor/ckeditor5-cloudeservices": "ckeditor/ckeditor5-cloudservices",
     "@ckeditor/ckeditor5-core": "ckeditor/ckeditor5-core",
     "@ckeditor/ckeditor5-easy-image": "ckeditor/ckeditor5-easy-image",
     "@ckeditor/ckeditor5-editor-balloon": "ckeditor/ckeditor5-editor-balloon",

+ 1 - 0
package.json

@@ -21,6 +21,7 @@
     "@ckeditor/ckeditor5-build-classic": "^1.0.0-alpha.1",
     "@ckeditor/ckeditor5-build-inline": "^1.0.0-alpha.1",
     "@ckeditor/ckeditor5-clipboard": "^1.0.0-alpha.1",
+    "@ckeditor/ckeditor5-cloudeservices": "ckeditor/ckeditor5-cloudservices",
     "@ckeditor/ckeditor5-core": "^1.0.0-alpha.1",
     "@ckeditor/ckeditor5-easy-image": "^1.0.0-alpha.1",
     "@ckeditor/ckeditor5-editor-balloon": "^1.0.0-alpha.1",