Skip to content

Build your personal knowledge base with Trilium Notes

chore(ckeditor5): fix references: Range -> ModelRange

Elian Doran6cea8e3b87a4
diff --git a/packages/ckeditor5/src/plugins/mention_customization.ts b/packages/ckeditor5/src/plugins/mention_customization.ts
index 2c747bd184..a6013c29fa 100644
--- a/packages/ckeditor5/src/plugins/mention_customization.ts
+++ b/packages/ckeditor5/src/plugins/mention_customization.ts
@@ -1,4 +1,4 @@
-import { Command, Mention, Plugin, Range, type Selectable } from "ckeditor5";
+import { Command, Mention, Plugin, ModelRange, type Selectable } from "ckeditor5";
/**
* Overrides the actions taken by the Mentions plugin (triggered by `@` in the text editor, or `~` & `#` in the attribute editor):
@@ -31,7 +31,7 @@ interface MentionOpts {
};
marker: string;
text?: string;
- range?: Range;
+ range?: ModelRange;
}
interface MentionAttribute {
diff --git a/packages/ckeditor5/src/plugins/move_block_updown.ts b/packages/ckeditor5/src/plugins/move_block_updown.ts
index bcd2a4f8f6..ec8b8b3911 100644
--- a/packages/ckeditor5/src/plugins/move_block_updown.ts
+++ b/packages/ckeditor5/src/plugins/move_block_updown.ts
@@ -2,7 +2,7 @@
* https://github.com/TriliumNext/Trilium/issues/1002
*/
-import { Command, DocumentSelection, ModelElement, ModelNode, Plugin, Range } from 'ckeditor5';
+import { Command, DocumentSelection, ModelElement, ModelNode, Plugin, ModelRange } from 'ckeditor5';
export default class MoveBlockUpDownPlugin extends Plugin {
init() {
@@ -81,7 +81,7 @@ abstract class MoveBlockUpDownCommand extends Command {
}
// Restore selection
- let range: Range;
+ let range: ModelRange;
const maxStart = firstBlock.maxOffset ?? startOffset;
const maxEnd = lastBlock.maxOffset ?? endOffset;
// If original offsets valid within bounds, restore partial selection