UNPKG

@wangeditor-kai/yjs-for-react

Version:

React specific components/utils for wangeditor-next-yjs.

28 lines (27 loc) 1.38 kB
/** * @description insert image menu * @author wangfupeng */ import { IDomEditor, IModalMenu } from '@wangeditor-next/core'; import { Node } from 'slate'; import { DOMElement } from '../../../utils/dom'; declare class InsertImage implements IModalMenu { readonly title: string; readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z\"></path></svg>"; readonly tag = "button"; readonly showModal = true; readonly modalWidth = 300; private $content; private readonly srcInputId; private readonly altInputId; private readonly hrefInputId; 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; private insertImage; } export default InsertImage;