Skip to content

Commit

Permalink
CKEditor Update: findAncestor
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed Nov 10, 2024
1 parent b73c344 commit 409a2d0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import Command from '@ckeditor/ckeditor5-core/src/command';
import {findAncestor} from '@ckeditor/ckeditor5-table/src/commands/utils';

class InsideTableCommand extends Command {
refresh() {
const {selection} = this.editor.model.document;
const tableParent = findAncestor('table', selection.getFirstPosition());
const tableParent = selection.getFirstPosition().findAncestor('table');
this.value = Boolean(tableParent);
}

Expand Down

0 comments on commit 409a2d0

Please sign in to comment.