瀏覽代碼

Merge pull request #1827 from ckeditor/i/6356

Docs: Extended `Model#deleteContent()` docs with an information about the direction option (see ckeditor/ckeditor5#6356, ckeditor/ckeditor5#6355).
Piotrek Koszuliński 5 年之前
父節點
當前提交
1c615df435
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/ckeditor5-engine/src/model/model.js

+ 4 - 0
packages/ckeditor5-engine/src/model/model.js

@@ -438,6 +438,10 @@ export default class Model {
 	 * **Note:** if there is no valid position for the selection, the paragraph will always be created:
 	 *
 	 * `[<image src="foo.jpg"></image>]` -> `<paragraph>[]</paragraph>`.
+	 *
+	 * @param {'forward'|'backward'} [options.direction='backward'] The direction in which the content is being consumed.
+	 * Deleting backward corresponds to using the <kbd>Backspace</kbd> key, while deleting content forward corresponds to
+	 * the <kbd>Shift</kbd>+<kbd>Backspace</kbd> keystroke.
 	 */
 	deleteContent( selection, options ) {
 		deleteContent( this, selection, options );