mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	chore(ckeditor5): fix references: Range -> ModelRange
This commit is contained in:
		
							parent
							
								
									28a63e0326
								
							
						
					
					
						commit
						6cea8e3b87
					
				@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user