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:
11
resources/js/wysiwyg/utils/styles.ts
Normal file
11
resources/js/wysiwyg/utils/styles.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user