mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
chore(ckeditor5): fix references: Selectable -> ModelSelectable
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user