fix: first row height boundary error #563

This commit is contained in:
Hufe921
2024-05-13 22:17:24 +08:00
parent fc55e557da
commit 6ada65e768
2 changed files with 20 additions and 11 deletions
+10
View File
@@ -11,6 +11,7 @@ import {
ElementType,
IEditorOption,
IElement,
ImageDisplay,
ListStyle,
ListType,
RowFlex,
@@ -23,6 +24,7 @@ import {
CONTROL_STYLE_ATTR,
EDITOR_ELEMENT_CONTEXT_ATTR,
EDITOR_ELEMENT_ZIP_ATTR,
INLINE_ELEMENT_TYPE,
INLINE_NODE_NAME,
TABLE_CONTEXT_ATTR,
TABLE_TD_ZIP_ATTR,
@@ -1377,3 +1379,11 @@ export function getSlimCloneElementList(elementList: IElement[]) {
'style'
])
}
export function getIsInlineElement(element?: IElement) {
return (
!!element?.type &&
(INLINE_ELEMENT_TYPE.includes(element.type) ||
element.imgDisplay === ImageDisplay.INLINE)
)
}