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):
 | 
					 * 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 {
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user