浏览代码

Docs: Mentioned that keystroke handler is not always the best choice.

Piotrek Koszuliński 7 年之前
父节点
当前提交
c5efc9748d
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 1
      packages/ckeditor5-core/src/command.js
  2. 5 0
      packages/ckeditor5-core/src/editor/editor.js

+ 1 - 1
packages/ckeditor5-core/src/command.js

@@ -141,7 +141,7 @@ export default class Command {
 	 * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).
 	 * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).
 	 * This behavior is implemented by a high priority listener to the {@link #event:execute} event.
 	 * This behavior is implemented by a high priority listener to the {@link #event:execute} event.
 	 *
 	 *
-	 * In order to see how to disable a command from "outside" see the {@link #isEnbled} documentation.
+	 * In order to see how to disable a command from "outside" see the {@link #isEnabled} documentation.
 	 *
 	 *
 	 * @fires execute
 	 * @fires execute
 	 */
 	 */

+ 5 - 0
packages/ckeditor5-core/src/editor/editor.js

@@ -201,6 +201,11 @@ export default class Editor {
 		 *			cancel();
 		 *			cancel();
 		 *		} );
 		 *		} );
 		 *
 		 *
+		 * Note: Certain, typing oriented keystrokes (like <kbd>Backspace</kbd> or <kbd>Enter</kbd>) are handled
+		 * by low level mechanism and trying to listen to them via the keystroke handler will not work reliably.
+		 * To handle those specific keystrokes see the events fired by the
+		 * {@link module:engine/view/document~Document editing view document} (`editor.editing.view.document`).
+		 *
 		 * @readonly
 		 * @readonly
 		 * @member {module:core/editingkeystrokehandler~EditingKeystrokeHandler}
 		 * @member {module:core/editingkeystrokehandler~EditingKeystrokeHandler}
 		 */
 		 */