Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1x 1x 9732x 9732x | import { defaultHTMLStyleMap } from '../../config/defaultHTMLStyleMap'; import type { DefaultStyleMap } from 'roosterjs-content-model-types'; /** * @internal * Get default CSS style of given element * @param element The element to get default style from * @returns A valid CSS style object */ export function getDefaultStyle(element: HTMLElement): Partial<CSSStyleDeclaration> { const tag = element.tagName.toLowerCase() as keyof DefaultStyleMap; return defaultHTMLStyleMap[tag] || {}; } |