@wangeditor/basic-modules
Version:
wangEditor basic modules
26 lines (25 loc) • 1.8 kB
TypeScript
/**
* @description insert link menu
* @author wangfupeng
*/
import { Node } from 'slate';
import { IModalMenu, IDomEditor } from '@wangeditor/core';
import { DOMElement } from '../../../utils/dom';
declare class InsertLinkMenu implements IModalMenu {
readonly title: string;
readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z\"></path><path d=\"M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z\"></path></svg>";
readonly tag = "button";
readonly showModal = true;
readonly modalWidth = 300;
private $content;
private readonly textInputId;
private readonly urlInputId;
private readonly buttonId;
getValue(editor: IDomEditor): string | boolean;
isActive(editor: IDomEditor): boolean;
exec(editor: IDomEditor, value: string | boolean): void;
isDisabled(editor: IDomEditor): boolean;
getModalPositionNode(editor: IDomEditor): Node | null;
getModalContentElem(editor: IDomEditor): DOMElement;
}
export default InsertLinkMenu;