feat: add list element
This commit is contained in:
@@ -55,7 +55,18 @@ export const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement> = [
|
||||
'checkbox',
|
||||
'dateFormat',
|
||||
'block',
|
||||
'level'
|
||||
'level',
|
||||
'listType',
|
||||
'listStyle'
|
||||
]
|
||||
|
||||
export const EDITOR_ELEMENT_CONTEXT_ATTR: Array<keyof IElement> = [
|
||||
'tdId',
|
||||
'trId',
|
||||
'tableId',
|
||||
'listId',
|
||||
'listType',
|
||||
'listStyle'
|
||||
]
|
||||
|
||||
export const TEXTLIKE_ELEMENT_TYPE: ElementType[] = [
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { UlStyle } from '../enum/List'
|
||||
|
||||
export const ulStyleMapping: Record<UlStyle, string> = {
|
||||
[UlStyle.DISC]: '•',
|
||||
[UlStyle.CIRCLE]: '◦',
|
||||
[UlStyle.SQUARE]: '▫︎'
|
||||
}
|
||||
@@ -13,5 +13,6 @@ export enum ElementType {
|
||||
TAB = 'tab',
|
||||
DATE = 'date',
|
||||
BLOCK = 'block',
|
||||
TITLE = 'title'
|
||||
TITLE = 'title',
|
||||
LIST = 'list'
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export enum ListType {
|
||||
UL = 'ul',
|
||||
OL = 'ol'
|
||||
}
|
||||
|
||||
export enum UlStyle {
|
||||
DISC = 'disc', // 实心圆点
|
||||
CIRCLE = 'circle', // 空心圆点
|
||||
SQUARE = 'square', // 实心方块
|
||||
}
|
||||
|
||||
export enum OlStyle {
|
||||
DECIMAL = 'decimal' // 阿拉伯数字
|
||||
}
|
||||
|
||||
export enum ListStyle {
|
||||
DISC = UlStyle.DISC,
|
||||
CIRCLE = UlStyle.CIRCLE,
|
||||
SQUARE = UlStyle.SQUARE,
|
||||
DECIMAL = OlStyle.DECIMAL
|
||||
}
|
||||
Reference in New Issue
Block a user