1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-07 05:22:22 +03:00

Lexical: Added cell width fetching, Created custom row node

This commit is contained in:
Dan Brown
2024-08-09 11:24:25 +01:00
parent e8532ef4de
commit da54e1d87c
8 changed files with 172 additions and 61 deletions

View File

@@ -0,0 +1,11 @@
export type StyleMap = Map<string, string>;
export function createStyleMapFromDomStyles(domStyles: CSSStyleDeclaration): StyleMap {
const styleMap: StyleMap = new Map();
const styleNames: string[] = Array.from(domStyles);
for (const style of styleNames) {
styleMap.set(style, domStyles.getPropertyValue(style));
}
return styleMap;
}