mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
chore(ckeditor5-admonition): fix references: DocumentFragment -> ViewDocumentFragment
This commit is contained in:
parent
be33f68c52
commit
395e9b2228
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Command, first } from 'ckeditor5';
|
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.
|
* 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 {
|
private _applyQuote( writer: Writer, blocks: Array<Element>, type?: AdmonitionType): void {
|
||||||
this._lastType = type;
|
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.
|
// Quote all groups of block. Iterate in the reverse order to not break following ranges.
|
||||||
getRangesOfBlockGroups( writer, blocks ).reverse().forEach( groupRange => {
|
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;
|
return elementOrPosition.parent!.name == 'aside' ? elementOrPosition.parent : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 { BalloonPanelView, CKEditorError } from 'ckeditor5';
|
||||||
import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js';
|
import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js';
|
||||||
|
|
||||||
export function getSelectedMathModelWidget(
|
export function getSelectedMathModelWidget(
|
||||||
selection: DocumentSelection
|
selection: ModelDocumentSelection
|
||||||
): null | ModelElement {
|
): null | ModelElement {
|
||||||
const selectedElement = selection.getSelectedElement();
|
const selectedElement = selection.getSelectedElement();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user