feat: add extension property
This commit is contained in:
@@ -429,6 +429,8 @@ export class RangeManager {
|
||||
const redo = this.historyManager.isCanRedo()
|
||||
// 组信息
|
||||
const groupIds = curElement.groupIds || null
|
||||
// 扩展字段
|
||||
const extension = curElement.extension ?? null
|
||||
const rangeStyle: IRangeStyle = {
|
||||
type,
|
||||
undo,
|
||||
@@ -449,7 +451,8 @@ export class RangeManager {
|
||||
listType,
|
||||
listStyle,
|
||||
groupIds,
|
||||
textDecoration
|
||||
textDecoration,
|
||||
extension
|
||||
}
|
||||
if (rangeStyleChangeListener) {
|
||||
rangeStyleChangeListener(rangeStyle)
|
||||
@@ -490,7 +493,8 @@ export class RangeManager {
|
||||
listType: null,
|
||||
listStyle: null,
|
||||
groupIds: null,
|
||||
textDecoration: null
|
||||
textDecoration: null,
|
||||
extension: null
|
||||
}
|
||||
if (rangeStyleChangeListener) {
|
||||
rangeStyleChangeListener(rangeStyle)
|
||||
|
||||
@@ -70,7 +70,8 @@ export const EDITOR_ELEMENT_ZIP_ATTR: Array<keyof IElement> = [
|
||||
'conceptId',
|
||||
'imgDisplay',
|
||||
'imgFloatPosition',
|
||||
'textDecoration'
|
||||
'textDecoration',
|
||||
'extension'
|
||||
]
|
||||
|
||||
export const TABLE_TD_ZIP_ATTR: Array<keyof ITd> = [
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface IElementBasic {
|
||||
id?: string
|
||||
type?: ElementType
|
||||
value: string
|
||||
extension?: unknown
|
||||
}
|
||||
|
||||
export interface IElementStyle {
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface IRangeStyle {
|
||||
listStyle: ListStyle | null
|
||||
groupIds: string[] | null
|
||||
textDecoration: ITextDecoration | null
|
||||
extension?: unknown | null
|
||||
}
|
||||
|
||||
export type IRangeStyleChange = (payload: IRangeStyle) => void
|
||||
|
||||
Reference in New Issue
Block a user