chore(ckeditor5-admonition): fix references: DocumentFragment -> ViewDocumentFragment

This commit is contained in:
Elian Doran 2025-07-12 19:29:51 +03:00
parent be33f68c52
commit 395e9b2228
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@
*/
import { Command, first } from 'ckeditor5';
import type { DocumentFragment, Element, Position, Range, Schema, Writer } from 'ckeditor5';
import type { ViewDocumentFragment, Element, Position, Range, Schema, Writer } from 'ckeditor5';
/**
* The block quote command plugin.
@ -191,7 +191,7 @@ export default class AdmonitionCommand extends Command {
*/
private _applyQuote( writer: Writer, blocks: Array<Element>, type?: AdmonitionType): void {
this._lastType = type;
const quotesToMerge: Array<Element | DocumentFragment> = [];
const quotesToMerge: Array<Element | ViewDocumentFragment> = [];
// Quote all groups of block. Iterate in the reverse order to not break following ranges.
getRangesOfBlockGroups( writer, blocks ).reverse().forEach( groupRange => {
@ -228,7 +228,7 @@ export default class AdmonitionCommand extends Command {
}
}
function findQuote( elementOrPosition: Element | Position ): Element | DocumentFragment | null {
function findQuote( elementOrPosition: Element | Position ): Element | ViewDocumentFragment | null {
return elementOrPosition.parent!.name == 'aside' ? elementOrPosition.parent : null;
}

View File

@ -1,9 +1,9 @@
import type { Editor, ModelElement, DocumentSelection, PositioningFunction } from 'ckeditor5';
import type { Editor, ModelElement, ModelDocumentSelection, PositioningFunction } from 'ckeditor5';
import { BalloonPanelView, CKEditorError } from 'ckeditor5';
import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js';
export function getSelectedMathModelWidget(
selection: DocumentSelection
selection: ModelDocumentSelection
): null | ModelElement {
const selectedElement = selection.getSelectedElement();