chore(ckeditor5): fix references: Selectable -> ModelSelectable

This commit is contained in:
Elian Doran
2025-07-12 19:44:38 +03:00
parent 446d5a0fcc
commit 4e97490cc6

View File

@@ -1,4 +1,4 @@
import { Command, Mention, Plugin, ModelRange, type Selectable } from "ckeditor5";
import { Command, Mention, Plugin, ModelRange, type ModelSelectable } from "ckeditor5";
/**
* Overrides the actions taken by the Mentions plugin (triggered by `@` in the text editor, or `~` & `#` in the attribute editor):
@@ -48,7 +48,7 @@ class CustomMentionCommand extends Command {
const {document} = model;
const {selection} = document;
const mention = options.mention as unknown as MentionAttribute;
const range = (options.range || selection.getFirstRange()) as Selectable;
const range = (options.range || selection.getFirstRange()) as ModelSelectable;
if (mention.id.startsWith('#') || mention.id.startsWith('~')) {
model.change(writer => {
@@ -69,7 +69,7 @@ class CustomMentionCommand extends Command {
}
}
insertReference(range: Selectable, notePath: string) {
insertReference(range: ModelSelectable, notePath: string) {
const {model} = this.editor;
model.change(writer => {