ソースを参照

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

Piotrek Koszuliński 6 年 前
コミット
6e2a997d3d

+ 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;
 	}