瀏覽代碼

Docs: Fixed an outdated sample. See https://github.com/ckeditor/ckeditor5-engine/issues/1636#issuecomment-472146324.

Piotrek Koszuliński 6 年之前
父節點
當前提交
6e2a997d3d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/framework/guides/tutorials/implementing-a-block-widget.md

+ 1 - 1
docs/framework/guides/tutorials/implementing-a-block-widget.md

@@ -757,7 +757,7 @@ export default class InsertSimpleBoxCommand extends Command {
 	refresh() {
 		const model = this.editor.model;
 		const selection = model.document.selection;
-		const allowedIn = model.schema.findAllowedParent( 'simpleBox', selection.getFirstPosition() );
+		const allowedIn = model.schema.findAllowedParent( selection.getFirstPosition(), 'simpleBox' );
 
 		this.isEnabled = allowedIn !== null;
 	}