Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: fix paste besides border should keep rich text (#4316)
ybzky2763f02ca57b
diff --git a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.tsindex 466a7fc2a5..13a5b05d8f 100644--- a/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts+++ b/packages/sheets-ui/src/controllers/clipboard/clipboard.controller.ts@@ -824,10 +824,14 @@ export class SheetClipboardController extends RxDisposable {matrix.forValue((row, col, value) => {const style = value.s;if (typeof style === 'object') {- valueMatrix.setValue(range.rows[row], range.cols[col], {- s: { ...style, bd: undefined },- v: value.v,- });+ const newValue = Tools.deepClone(value);+ if (newValue.s) {+ newValue.s = {+ ...style,+ bd: null,+ };+ }+ valueMatrix.setValue(range.rows[row], range.cols[col], newValue);}});