feat: handle list boundary
This commit is contained in:
@@ -26,9 +26,7 @@ export const EDITOR_ELEMENT_COPY_ATTR: Array<keyof IElement> = [
|
||||
'url',
|
||||
'hyperlinkId',
|
||||
'dateId',
|
||||
'dateFormat',
|
||||
'level',
|
||||
'titleId'
|
||||
'dateFormat'
|
||||
]
|
||||
|
||||
export const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement> = [
|
||||
@@ -64,6 +62,8 @@ export const EDITOR_ELEMENT_CONTEXT_ATTR: Array<keyof IElement> = [
|
||||
'tdId',
|
||||
'trId',
|
||||
'tableId',
|
||||
'level',
|
||||
'titleId',
|
||||
'listId',
|
||||
'listType',
|
||||
'listStyle'
|
||||
@@ -87,5 +87,12 @@ export const INLINE_ELEMENT_TYPE: ElementType[] = [
|
||||
|
||||
export const INLINE_NODE_NAME: string[] = [
|
||||
'HR',
|
||||
'TABLE'
|
||||
'TABLE',
|
||||
'UL',
|
||||
'OL'
|
||||
]
|
||||
|
||||
export const VIRTUAL_ELEMENT_TYPE: ElementType[] = [
|
||||
ElementType.TITLE,
|
||||
ElementType.LIST
|
||||
]
|
||||
@@ -1,7 +1,19 @@
|
||||
import { UlStyle } from '../enum/List'
|
||||
import { ListStyle, ListType, UlStyle } from '../enum/List'
|
||||
|
||||
export const ulStyleMapping: Record<UlStyle, string> = {
|
||||
[UlStyle.DISC]: '•',
|
||||
[UlStyle.CIRCLE]: '◦',
|
||||
[UlStyle.SQUARE]: '▫︎'
|
||||
}
|
||||
|
||||
export const listTypeElementMapping: Record<ListType, string> = {
|
||||
[ListType.OL]: 'ol',
|
||||
[ListType.UL]: 'ul'
|
||||
}
|
||||
|
||||
export const listStyleCSSMapping: Record<ListStyle, string> = {
|
||||
[ListStyle.DISC]: 'disc',
|
||||
[ListStyle.CIRCLE]: 'circle',
|
||||
[ListStyle.SQUARE]: 'square',
|
||||
[ListStyle.DECIMAL]: 'decimal'
|
||||
}
|
||||
Reference in New Issue
Block a user