@wangeditor-next/plugin-float-image
Advanced tools
| /** | ||
| * @description preview image menu | ||
| */ | ||
| import { IButtonMenu, IDomEditor } from '@wangeditor-next/core'; | ||
| declare class PreviewImage implements IButtonMenu { | ||
| readonly title: string; | ||
| readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z\" p-id=\"10909\"></path><path d=\"M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z\" p-id=\"10910\"></path><path d=\"M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z\"></path></svg>"; | ||
| readonly tag = "button"; | ||
| getValue(editor: IDomEditor): string | boolean; | ||
| isActive(_editor: IDomEditor): boolean; | ||
| isDisabled(editor: IDomEditor): boolean; | ||
| exec(editor: IDomEditor, value: string | boolean): void; | ||
| } | ||
| export default PreviewImage; |
| /** | ||
| * @description lower-alpha ordered list menu | ||
| * @author wangfupeng | ||
| */ | ||
| import { OrderedListType } from '../custom-types'; | ||
| import BaseMenu from './BaseMenu'; | ||
| declare class LowerAlphaListMenu extends BaseMenu { | ||
| readonly ordered = true; | ||
| readonly orderType: OrderedListType; | ||
| readonly title: string; | ||
| readonly iconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z\"></path></svg>"; | ||
| } | ||
| export default LowerAlphaListMenu; |
@@ -50,2 +50,3 @@ /** | ||
| editSize: string; | ||
| preview: string; | ||
| viewLink: string; | ||
@@ -52,0 +53,0 @@ src: string; |
@@ -50,2 +50,3 @@ /** | ||
| editSize: string; | ||
| preview: string; | ||
| viewLink: string; | ||
@@ -52,0 +53,0 @@ src: string; |
@@ -7,5 +7,13 @@ /** | ||
| import { Text } from 'slate'; | ||
| type BlockTypeForFormatPainter = 'header1' | 'header2' | 'header3' | 'header4' | 'header5' | 'header6' | 'blockquote' | 'list-item' | 'todo'; | ||
| type OrderedListTypeForFormatPainter = '1' | 'a' | 'A' | 'i' | 'I'; | ||
| interface BlockStyleForFormatPainter { | ||
| type: BlockTypeForFormatPainter; | ||
| ordered?: boolean; | ||
| orderType?: OrderedListTypeForFormatPainter; | ||
| } | ||
| interface FormatPaintAttributes { | ||
| isSelect: boolean; | ||
| formatStyle: Omit<Text, 'text'> | null; | ||
| formatBlockStyle: BlockStyleForFormatPainter | null; | ||
| } | ||
@@ -20,2 +28,9 @@ declare class FormatPainter implements IButtonMenu { | ||
| isDisabled(_editor: IDomEditor): boolean; | ||
| private isSourceBlockType; | ||
| private isTargetBlockType; | ||
| private getTopLevelSelectedBlocks; | ||
| private normalizeListOrderType; | ||
| private getSelectedBlockStyle; | ||
| private unsetListAttrs; | ||
| private applyBlockStyle; | ||
| setFormatHtml(editor: IDomEditor): void; | ||
@@ -22,0 +37,0 @@ exec(editor: IDomEditor): void; |
@@ -9,2 +9,3 @@ /** | ||
| import InsertImage from './InsertImage'; | ||
| import PreviewImage from './PreviewImage'; | ||
| import ViewImageLink from './ViewImageLink'; | ||
@@ -42,2 +43,6 @@ import ImageWidth30 from './Width30'; | ||
| }; | ||
| export declare const previewImageMenuConf: { | ||
| key: string; | ||
| factory(): PreviewImage; | ||
| }; | ||
| export declare const imageWidth30MenuConf: { | ||
@@ -44,0 +49,0 @@ key: string; |
@@ -141,2 +141,3 @@ /** | ||
| editImage: IEditImageConfig; | ||
| previewImage: ISingleMenuConfig; | ||
| viewImageLink: ISingleMenuConfig; | ||
@@ -170,2 +171,3 @@ imageWidth30: ISingleMenuConfig; | ||
| numberedList: ISingleMenuConfig; | ||
| numberedListLowerAlpha: ISingleMenuConfig; | ||
| insertTable: ISingleMenuConfig; | ||
@@ -172,0 +174,0 @@ deleteTable: ISingleMenuConfig; |
@@ -9,4 +9,5 @@ /** | ||
| orderedList: string; | ||
| lowerAlphaList: string; | ||
| }; | ||
| }; | ||
| export default _default; |
@@ -9,4 +9,5 @@ /** | ||
| orderedList: string; | ||
| lowerAlphaList: string; | ||
| }; | ||
| }; | ||
| export default _default; |
@@ -6,2 +6,3 @@ /** | ||
| import { Text } from 'slate'; | ||
| export type OrderedListType = '1' | 'a' | 'A' | 'i' | 'I'; | ||
| export type ListItemElement = { | ||
@@ -11,3 +12,5 @@ type: 'list-item'; | ||
| level: number; | ||
| start?: number; | ||
| orderType?: OrderedListType; | ||
| children: Text[]; | ||
| }; |
@@ -6,3 +6,6 @@ /** | ||
| import { IDomEditor } from '@wangeditor-next/core'; | ||
| import { ListItemElement } from './custom-types'; | ||
| import { ListItemElement, OrderedListType } from './custom-types'; | ||
| export declare function getNormalizedOrderedListStart(elem: ListItemElement): number; | ||
| export declare function getNormalizedOrderedListType(elem: ListItemElement): OrderedListType; | ||
| export declare function hasSameListConfig(a: ListItemElement, b: ListItemElement): boolean; | ||
| /** | ||
@@ -9,0 +12,0 @@ * 获取上一个同一 level 的 list item |
@@ -6,5 +6,7 @@ /** | ||
| import { IButtonMenu, IDomEditor } from '@wangeditor-next/core'; | ||
| import { OrderedListType } from '../custom-types'; | ||
| declare abstract class BaseMenu implements IButtonMenu { | ||
| readonly type = "list-item"; | ||
| abstract readonly ordered: boolean; | ||
| readonly orderType?: OrderedListType; | ||
| abstract readonly title: string; | ||
@@ -11,0 +13,0 @@ abstract readonly iconSvg: string; |
@@ -6,2 +6,3 @@ /** | ||
| import BulletedListMenu from './BulletedListMenu'; | ||
| import LowerAlphaListMenu from './LowerAlphaListMenu'; | ||
| import NumberedListMenu from './NumberedListMenu'; | ||
@@ -16,1 +17,5 @@ export declare const bulletedListMenuConf: { | ||
| }; | ||
| export declare const numberedListLowerAlphaMenuConf: { | ||
| key: string; | ||
| factory(): LowerAlphaListMenu; | ||
| }; |
@@ -9,3 +9,3 @@ /** | ||
| import { ListItemElement } from './custom-types'; | ||
| declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement; | ||
| declare function parseItemHtml(elem: DOMElement, children: Descendant[], editor: IDomEditor): ListItemElement | ListItemElement[]; | ||
| export declare const parseItemHtmlConf: { | ||
@@ -12,0 +12,0 @@ selector: string; |
+2
-2
| { | ||
| "name": "@wangeditor-next/plugin-float-image", | ||
| "version": "2.0.3", | ||
| "version": "2.0.4", | ||
| "description": "wangEditor float image plugin", | ||
@@ -37,3 +37,3 @@ "author": "cycleccc <2991205548@qq.com>", | ||
| "peerDependencies": { | ||
| "@wangeditor-next/editor": "5.7.3", | ||
| "@wangeditor-next/editor": "5.7.4", | ||
| "dom7": "^3.0.0 || ^4.0.0", | ||
@@ -40,0 +40,0 @@ "slate": "^0.123.0", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
419228
0.76%432
0.47%7523
0.91%