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
feat(sheet): normalized url support for editing cell contents (#6024)
Shiyun Hua052b7654537a
diff --git a/packages/sheets-hyper-link/src/controllers/set-range.controller.ts b/packages/sheets-hyper-link/src/controllers/set-range.controller.tsindex e367827df6..75f5d07f0d 100644--- a/packages/sheets-hyper-link/src/controllers/set-range.controller.ts+++ b/packages/sheets-hyper-link/src/controllers/set-range.controller.ts@@ -148,6 +148,7 @@ export class SheetHyperLinkSetRangeController extends Disposable {if (typeof cell.v === 'string' && Tools.isLegalUrl(cell.v) && cell.v[cell.v.length - 1] !== ' ') {const { unitId, subUnitId, row, col } = context;+ const link = Tools.normalizeUrl(cell.v);const workbook = this._univerInstanceService.getUnit<Workbook>(unitId, UniverInstanceType.UNIVER_SHEET);const worksheet = workbook?.getSheetBySheetId(subUnitId);if (!worksheet) {@@ -176,7 +177,7 @@ export class SheetHyperLinkSetRangeController extends Disposable {rangeId: generateRandomId(),rangeType: CustomRangeType.HYPERLINK,properties: {- url: cell.v,+ url: link,},}],},