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

This commit is contained in:
Elian Doran 2025-07-12 19:43:18 +03:00
parent 28a63e0326
commit 6cea8e3b87
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -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): * 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; marker: string;
text?: string; text?: string;
range?: Range; range?: ModelRange;
} }
interface MentionAttribute { interface MentionAttribute {

View File

@ -2,7 +2,7 @@
* https://github.com/TriliumNext/Trilium/issues/1002 * 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 { export default class MoveBlockUpDownPlugin extends Plugin {
init() { init() {
@ -81,7 +81,7 @@ abstract class MoveBlockUpDownCommand extends Command {
} }
// Restore selection // Restore selection
let range: Range; let range: ModelRange;
const maxStart = firstBlock.maxOffset ?? startOffset; const maxStart = firstBlock.maxOffset ?? startOffset;
const maxEnd = lastBlock.maxOffset ?? endOffset; const maxEnd = lastBlock.maxOffset ?? endOffset;
// If original offsets valid within bounds, restore partial selection // If original offsets valid within bounds, restore partial selection