瀏覽代碼

Merge branch 'master' into i/5886

Piotrek Koszuliński 6 年之前
父節點
當前提交
8125746c66

+ 4 - 0
.editorconfig

@@ -10,3 +10,7 @@ charset = utf-8
 end_of_line = lf
 trim_trailing_whitespace = true
 insert_final_newline = true
+
+[package.json]
+indent_style = space
+tab_width = 2

+ 23 - 0
.github/ISSUE_TEMPLATE/3-enhancement.md

@@ -0,0 +1,23 @@
+---
+name: "💅 Enhancement"
+about: Improve an existing functionality.
+title: ''
+labels: type:enhancement
+assignees: ''
+
+---
+
+## 📝 Provide a description of the improvement
+
+*How the feature works now and what you'd like to change*?
+
+## 📃 Other details
+
+* Browser: …
+* OS: …
+* CKEditor version: …
+* Installed CKEditor plugins: …
+
+---
+
+If you'd like to see this improvement implemented, add a 👍 reaction to this post.

.github/ISSUE_TEMPLATE/3-docs-issue.md → .github/ISSUE_TEMPLATE/6-docs-issue.md


+ 12 - 0
README.md

@@ -671,6 +671,18 @@ See CKEditor 5 release blog posts [on the CKEditor blog](https://ckeditor.com/bl
 
 <tr>
 	<td>
+		<a href="https://github.com/ckeditor/ckeditor5-special-characters"><code>@ckeditor/ckeditor5-special-characters</code></a>
+	</td>
+	<td>
+		<a href="https://www.npmjs.com/package/@ckeditor/ckeditor5-special-characters"><img src="https://img.shields.io/npm/v/@ckeditor/ckeditor5-special-characters.svg" alt="@ckeditor/ckeditor5-special-characters npm package badge"></a>
+	</td>
+	<td>
+		The special characters feature.
+	</td>
+</tr>
+
+<tr>
+	<td>
 		<a href="https://github.com/ckeditor/ckeditor5-table"><code>@ckeditor/ckeditor5-table</code></a>
 	</td>
 	<td>

+ 4 - 0
docs/_snippets/framework/tutorials/inline-widget.js

@@ -75,6 +75,10 @@ class PlaceholderUI extends Plugin {
 				withText: true
 			} );
 
+			// Disable the placeholder button when the command is disabled.
+			const command = editor.commands.get( 'placeholder' );
+			dropdownView.bind( 'isEnabled' ).to( command );
+
 			// Execute the command when the dropdown item is clicked (executed).
 			this.listenTo( dropdownView, 'execute', evt => {
 				editor.execute( 'placeholder', { value: evt.source.commandParam } );

File diff suppressed because it is too large
+ 129 - 129
docs/builds/guides/migrate.md


+ 2 - 1
docs/framework/guides/contributing/testing-environment.md

@@ -23,7 +23,7 @@ It accepts the following arguments that must be passed after the `--` option:
 * `--source-map` (alias `-s`) &ndash; Whether to generate useful source maps for the code.
 * `--coverage` (alias `-c`) &ndash; Whether to generate code coverage.
 * `--verbose` (alias `-v`) &ndash; Allows switching on webpack logs.
-* `--files` &ndash; Specifies test files to run. Accepts a package name or a glob. Read more about the [rules for converting the `--files` option to a glob pattern](https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-tests#rules-for-converting---files-option-to-glob-pattern).
+* `--files` &ndash; Specifies test files to run. Accepts a package name or a glob. For example `--files=engine` will run tests from `ckeditor5-engine` package. Read more about the [rules for converting the `--files` option to a glob pattern](https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-tests#rules-for-converting---files-option-to-glob-pattern).
 * `--browsers` &ndash; Browsers that will be used to run the tests. Defaults to `Chrome`.
 * `--debug` (alias `-d`) &ndash; Allows specifying custom debug flags. For example, the `--debug engine` option uncomments the `// @if CK_DEBUG_ENGINE //` lines in the code. Note that by default `--debug` is set to `true` even if you did not specify it. This enables the base set of debug logs (`// @if CK_DEBUG //`) which should always be enabled in the testing environment. You can completely turn off the debug mode by setting the `--debug false` option.
 
@@ -54,6 +54,7 @@ In order to start the manual tests server, use the `yarn run manual` task.
 The task accepts the following options:
 
 * `--source-map` (alias `-s`) &ndash; Whether to generate useful source maps for the code.
+* `--files` &ndash; Specifies test files to run. Accepts a package name or a glob. For example `--files=ckeditor5` will run tests from the main repository. Read more about the [rules for converting the `--files` option to a glob pattern](https://github.com/ckeditor/ckeditor5-dev/tree/master/packages/ckeditor5-dev-tests#rules-for-converting---files-option-to-glob-pattern).
 * `--additionalLanguages="ar,pl,..."` &ndash; Specifies extra languages to the [CKEditor 5 webpack plugin](https://www.npmjs.com/package/@ckeditor/ckeditor5-dev-webpack-plugin). Check out the {@link features/ui-language UI language guide} to learn more.
 * `--debug` (alias `-d`) &ndash; Allows specifying custom debug flags. For example, the `--debug engine` option uncomments the `// @if CK_DEBUG_ENGINE //` lines in the code. Note that by default `--debug` is set to `true` even if you did not specify it. This enables the base set of debug logs (`// @if CK_DEBUG //`) which should always be enabled in the testing environment. You can completely turn off the debug mode by setting the `--debug false` option.
 

+ 5 - 6
docs/framework/guides/custom-editor-creator.md

@@ -23,7 +23,7 @@ import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement
 import mix from '@ckeditor/ckeditor5-utils/src/mix';
 
 /**
- * The multi-root editor implementation. It provides an inline editables and a toolbar.
+ * The multi-root editor implementation. It provides inline editables and a single toolbar.
  *
  * Unlike other editors, the toolbar is not rendered automatically and needs to be attached to the DOM manually.
  *
@@ -198,11 +198,10 @@ class MultirootEditorUI extends EditorUI {
 
 		for ( const editable of this.view.editables ) {
 			// The editable UI element in DOM is available for sure only after the editor UI view has been rendered.
-			// But it can be available earlier if a DOM element has been passed to DecoupledEditor.create().
+			// But it can be available earlier if a DOM element has been passed to MultirootEditor.create().
 			const editableElement = editable.element;
 
-			// Register the editable UI view in the editor. A single editor instance can aggregate multiple
-			// editable areas (roots) but the decoupled editor has only one.
+			// Register each editable UI view in the editor.
 			this.setEditableElement( editable.name, editableElement );
 
 			// Let the global focus tracker know that the editable UI element is focusable and
@@ -268,7 +267,7 @@ class MultirootEditorUI extends EditorUI {
 	}
 
 	/**
-	 * Initializes the inline editor toolbar and its panel.
+	 * Initializes the editor main toolbar and its panel.
 	 *
 	 * @private
 	 */
@@ -345,7 +344,7 @@ class MultirootEditorUIView extends EditorUIView {
 		super( locale );
 
 		/**
-		 * The main toolbar of the decoupled editor UI.
+		 * The main toolbar of the multi-root editor UI.
 		 *
 		 * @readonly
 		 * @member {module:ui/toolbar/toolbarview~ToolbarView}

+ 8 - 0
docs/framework/guides/tutorials/implementing-an-inline-widget.md

@@ -581,6 +581,10 @@ export default class PlaceholderUI extends Plugin {
 				withText: true
 			} );
 
+			// Disable the placeholder button when the command is disabled.
+			const command = editor.commands.get( 'placeholder' );
+			dropdownView.bind( 'isEnabled' ).to( command );
+
 			// Execute the command when the dropdown item is clicked (executed).
 			this.listenTo( dropdownView, 'execute', evt => {
 				editor.execute( 'placeholder', { value: evt.source.commandParam } );
@@ -805,6 +809,10 @@ class PlaceholderUI extends Plugin {
 				withText: true
 			} );
 
+			// Disable the placeholder button when the command is disabled.
+			const command = editor.commands.get( 'placeholder' );
+			dropdownView.bind( 'isEnabled' ).to( command );
+
 			// Execute the command when the dropdown item is clicked (executed).
 			this.listenTo( dropdownView, 'execute', evt => {
 				editor.execute( 'placeholder', { value: evt.source.commandParam } );

+ 1 - 0
mrgit.json

@@ -44,6 +44,7 @@
     "@ckeditor/ckeditor5-paste-from-office": "ckeditor/ckeditor5-paste-from-office",
     "@ckeditor/ckeditor5-remove-format": "ckeditor/ckeditor5-remove-format",
     "@ckeditor/ckeditor5-restricted-editing": "ckeditor/ckeditor5-restricted-editing",
+    "@ckeditor/ckeditor5-special-characters": "ckeditor/ckeditor5-special-characters",
     "@ckeditor/ckeditor5-table": "ckeditor/ckeditor5-table",
     "@ckeditor/ckeditor5-theme-lark": "ckeditor/ckeditor5-theme-lark",
     "@ckeditor/ckeditor5-typing": "ckeditor/ckeditor5-typing",

+ 1 - 0
package.json

@@ -62,6 +62,7 @@
     "@ckeditor/ckeditor5-paste-from-office": "^16.0.0",
     "@ckeditor/ckeditor5-remove-format": "^16.0.0",
     "@ckeditor/ckeditor5-restricted-editing": "^16.0.0",
+    "@ckeditor/ckeditor5-special-characters": "^0.0.1",
     "@ckeditor/ckeditor5-table": "^16.0.0",
     "@ckeditor/ckeditor5-theme-lark": "^16.0.0",
     "@ckeditor/ckeditor5-typing": "^16.0.0",

+ 2 - 4
scripts/release/changelog.js

@@ -15,9 +15,7 @@
 const devEnv = require( '@ckeditor/ckeditor5-dev-env' );
 const commonOptions = {
 	cwd: process.cwd(),
-	packages: 'packages',
-	// `newVersion` is mostly used for testing purposes. It allows generating changelog that contains the same version for all packages.
-	newVersion: process.argv[ 2 ] || null
+	packages: 'packages'
 };
 const editorBuildsGlob = '@ckeditor/ckeditor5-build-*';
 
@@ -32,7 +30,7 @@ const optionsForBuilds = Object.assign( {}, commonOptions, {
 
 Promise.resolve()
 	.then( () => devEnv.generateChangelogForSubRepositories( optionsForDependencies ) )
-	.then( () => devEnv.generateSummaryChangelog( optionsForBuilds ) )
+	.then( response => devEnv.generateSummaryChangelog( Object.assign( optionsForBuilds, response ) ) )
 	.then( () => {
 		console.log( 'Done!' );
 	} )

+ 1 - 2
tests/manual/wproofreader.html

@@ -1,9 +1,8 @@
 <head>
 	<!--
 		Required to fetch runtime data from https://svc.webspellchecker.net.
-		Also both unsafe inline and eval are required for it to work (https://github.com/WebSpellChecker/wproofreader/issues/19).
 	-->
-	<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval' https://cksource.com https://svc.webspellchecker.net;">
+	<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://cksource.com https://svc.webspellchecker.net;">
 </head>
 
 <script

+ 2 - 0
tests/manual/wproofreader.md

@@ -1,5 +1,7 @@
 # Wproofreader
 
+Proofreader requires a valid license to work, otherwise it returns 403. Read on the [dev KB article](https://github.com/cksource/ckeditor5-knowledge-base/blob/master/testing-phase.md#wproofreader-samplemanual-test) to set it up locally.
+
 Note: the plugin starts checking only **after focusing** the editor.
 
 ## Inline typo correction

File diff suppressed because it is too large
+ 202 - 286
yarn.lock