mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(ckeditor5): fix type errors
This commit is contained in:
parent
fe8e090b1b
commit
7972d3f31b
@ -1,7 +1,12 @@
|
|||||||
import type { Element, Writer } from "ckeditor5";
|
import type { Element, Position, Writer } from "ckeditor5";
|
||||||
import type { Node, Editor } from "ckeditor5";
|
import type { Node, Editor } from "ckeditor5";
|
||||||
import { Plugin } from "ckeditor5";
|
import { Plugin } from "ckeditor5";
|
||||||
|
|
||||||
|
interface SpanStackEntry {
|
||||||
|
className: string;
|
||||||
|
posStart: Position;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This code is an adaptation of https://github.com/antoniotejada/Trilium-SyntaxHighlightWidget with additional improvements, such as:
|
* This code is an adaptation of https://github.com/antoniotejada/Trilium-SyntaxHighlightWidget with additional improvements, such as:
|
||||||
*
|
*
|
||||||
@ -234,10 +239,10 @@ export default class SyntaxHighlighting extends Plugin {
|
|||||||
|
|
||||||
let iHtml = 0;
|
let iHtml = 0;
|
||||||
let html = highlightRes.value;
|
let html = highlightRes.value;
|
||||||
let spanStack = [];
|
let spanStack: SpanStackEntry[] = [];
|
||||||
let iChild = -1;
|
let iChild = -1;
|
||||||
let childText = "";
|
let childText = "";
|
||||||
let child = null;
|
let child: Node | null = null;
|
||||||
let iChildText = 0;
|
let iChildText = 0;
|
||||||
|
|
||||||
while (iHtml < html.length) {
|
while (iHtml < html.length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user