diff --git a/packages/docs-ui/src/services/clipboard/html-to-udm/parse-node-style.ts b/packages/docs-ui/src/services/clipboard/html-to-udm/parse-node-style.ts index 3b6fcb9408..604905e7dd 100644 --- a/packages/docs-ui/src/services/clipboard/html-to-udm/parse-node-style.ts +++ b/packages/docs-ui/src/services/clipboard/html-to-udm/parse-node-style.ts @@ -17,8 +17,6 @@ import type { ITextStyle } from '@univerjs/core'; import { BaselineOffset, BooleanNumber, ColorKit } from '@univerjs/core'; -import { ptToPixel } from './utils'; - export function extractNodeStyle(node: HTMLElement): ITextStyle { const styles = node.style; const docStyles: ITextStyle = {}; @@ -74,7 +72,9 @@ export function extractNodeStyle(node: HTMLElement): ITextStyle { if (!Number.isNaN(fontSize)) { // TODO: @JOCS, hand other CSS value unit, rem, em, pt, % - docStyles.fs = cssValue.endsWith('pt') ? ptToPixel(fontSize) : fontSize; + if (cssValue.endsWith('pt')) { + docStyles.fs = fontSize; + } } break; diff --git a/packages/sheets-ui/src/services/clipboard/html-to-usm/parse-node-style.ts b/packages/sheets-ui/src/services/clipboard/html-to-usm/parse-node-style.ts index afdfba8542..b11d964eb3 100644 --- a/packages/sheets-ui/src/services/clipboard/html-to-usm/parse-node-style.ts +++ b/packages/sheets-ui/src/services/clipboard/html-to-usm/parse-node-style.ts @@ -17,8 +17,6 @@ import type { ITextStyle } from '@univerjs/core'; import { BaselineOffset, BooleanNumber, ColorKit } from '@univerjs/core'; -import { ptToPixel } from './utils'; - export function extractNodeStyle(node: HTMLElement): ITextStyle { const styles = node.style; const docStyles: ITextStyle = {}; @@ -74,7 +72,9 @@ export function extractNodeStyle(node: HTMLElement): ITextStyle { if (!Number.isNaN(fontSize)) { // TODO: @JOCS, hand other CSS value unit, rem, em, pt, % - docStyles.fs = cssValue.endsWith('pt') ? ptToPixel(fontSize) : fontSize; + if (cssValue.endsWith('pt')) { + docStyles.fs = fontSize; + } } break;