TableCellNode
} from "@lexical/table";
import {TableCellHeaderState} from "@lexical/table/LexicalTableCellNode";
-import {createStyleMapFromDomStyles, StyleMap} from "../utils/styles";
+import {extractStyleMapFromElement, StyleMap} from "../utils/dom";
export type SerializedCustomTableCellNode = Spread<{
styles: Record<string, string>,
return cellNode;
}
+ clearWidth(): void {
+ const self = this.getWritable();
+ self.__width = undefined;
+ }
+
getStyles(): StyleMap {
const self = this.getLatest();
return new Map(self.__styles);
const output = $convertTableCellNodeElement(domNode);
if (domNode instanceof HTMLElement && output.node instanceof CustomTableCellNode) {
- output.node.setStyles(createStyleMapFromDomStyles(domNode.style));
+ output.node.setStyles(extractStyleMapFromElement(domNode));
}
return output;