UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

40 lines (39 loc) 1.43 kB
/*! * Jodit Editor PRO (https://xdsoft.net/jodit/) * See LICENSE.md in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/ */ import type { IDictionary, IJodit } from "jodit/esm/types/index"; export interface IJElement { name: string; readonly type: number; readonly isText: boolean; readonly isElement: boolean; readonly isComment: boolean; readonly isSingle: boolean; readonly length: number; attributes: IDictionary; style: IDictionary; parent: IJElement | null; append(child: IJElement): IJElement; readonly previousElement: IJElement | null; readonly lastElement: IJElement | null; readonly previous: IJElement | null; readonly next: IJElement | null; forEach(callbackFn: (node: IJElement) => void | false, recursion?: boolean): void | false; find(predicate: (child: IJElement) => boolean, recursion?: boolean): IJElement[]; map<T>(callbackFn: (node: IJElement) => T): T[]; remove(): IJElement; textBetween(start: (n: IJElement) => boolean, end: (n: IJElement) => boolean): string; wrap(tag: string): IJElement; } export type ICaseContext = IDictionary & { jodit: IJodit; rtf: string; }; export interface ICaseFn { (elm: IJElement, context: ICaseContext): null | IJElement; } export interface RenderFilter { (elm: IJElement): boolean; }