jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
41 lines (40 loc) • 1.37 kB
TypeScript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module ui
*/
import type { CanUndef, IUIIconState, IViewBased } from "../../types/index";
export declare class Icon {
private static icons;
private static getIcon;
/**
* Check if icon exist in store
*/
static exists(name: string): boolean;
/**
* Return SVG icon
*/
static get(name: string, defaultValue?: string): string;
/**
* Set SVG in store
*/
static set(name: string, value: string): typeof Icon;
private static __cache;
/**
* Make icon html element
*/
static makeIcon(jodit: IViewBased, icon: IUIIconState): CanUndef<Node>;
/**
* Turn a raw icon string into an element with a `classList`.
*
* A plain-text icon (e.g. an emoji/text glyph) makes `fromHTML` return a
* Text node, which has no `classList`; wrap it in a span so classes/styles
* can be applied and `makeIcon` never crashes on `iconElement.classList`.
* Note: SVG icons are `SVGElement` (not `HTMLElement`) but are still Element
* nodes with a `classList`, so we check `isElement`, not `isHTMLElement`.
*/
private static toIconElement;
}