Skip to content

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.

fix: links pasted into cells require paragraph attributes (#3980)

ybzky69a65e88b444
diff --git a/packages/sheets-ui/src/controllers/clipboard/utils.ts b/packages/sheets-ui/src/controllers/clipboard/utils.ts
index c7cc78b748..8b15cce67a 100644
--- a/packages/sheets-ui/src/controllers/clipboard/utils.ts
+++ b/packages/sheets-ui/src/controllers/clipboard/utils.ts
@@ -616,6 +616,9 @@ export function generateBody(text: string): IDocumentBody {
return {
dataStream: `${urlText}\r\n`,
+ paragraphs: [{
+ startIndex: urlText.length,
+ }],
customRanges: [range],
};
}