@univerjs/sheets-hyper-link 0.6.5 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,8 @@ export interface IFRangeHyperlinkMixin {
|
|
|
16
16
|
* ```ts
|
|
17
17
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
18
18
|
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
19
|
+
*
|
|
20
|
+
* // Create a hyperlink to Univer on cell A1
|
|
19
21
|
* const fRange = fWorksheet.getRange('A1');
|
|
20
22
|
* const richText = univerAPI.newRichText().insertLink('Univer', 'https://univer.ai/');
|
|
21
23
|
* fRange.setRichTextValueForCell(richText);
|
|
@@ -28,11 +30,13 @@ export interface IFRangeHyperlinkMixin {
|
|
|
28
30
|
* ```ts
|
|
29
31
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
30
32
|
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
33
|
+
*
|
|
34
|
+
* // Create a hyperlink to Univer on cell A1
|
|
31
35
|
* const fRange = fWorksheet.getRange('A1');
|
|
32
36
|
* const richText = univerAPI.newRichText().insertLink('Univer', 'https://univer.ai/');
|
|
33
37
|
* fRange.setRichTextValueForCell(richText);
|
|
34
38
|
*
|
|
35
|
-
* // Get hyperlinks
|
|
39
|
+
* // Get hyperlinks from cell A1
|
|
36
40
|
* console.log(fRange.getValue(true).getLinks());
|
|
37
41
|
* ```
|
|
38
42
|
*/
|
|
@@ -52,7 +56,7 @@ export interface IFRangeHyperlinkMixin {
|
|
|
52
56
|
* const cellValue = fRange.getValue(true);
|
|
53
57
|
* const hyperlinks = cellValue.getLinks();
|
|
54
58
|
* const id = hyperlinks[0].rangeId;
|
|
55
|
-
* const newUrl = 'https://
|
|
59
|
+
* const newUrl = 'https://insight.univer.ai/';
|
|
56
60
|
* const newRichText = cellValue.copy().updateLink(id, newUrl);
|
|
57
61
|
* fRange.setRichTextValueForCell(newRichText);
|
|
58
62
|
* }, 3000);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-hyper-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@univerjs/protocol": "0.1.44",
|
|
55
|
-
"@univerjs/
|
|
56
|
-
"@univerjs/
|
|
57
|
-
"@univerjs/
|
|
58
|
-
"@univerjs/
|
|
55
|
+
"@univerjs/core": "0.6.6",
|
|
56
|
+
"@univerjs/docs": "0.6.6",
|
|
57
|
+
"@univerjs/sheets": "0.6.6",
|
|
58
|
+
"@univerjs/engine-formula": "0.6.6"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"rxjs": "^7.8.1",
|
|
62
62
|
"typescript": "^5.8.2",
|
|
63
63
|
"vite": "^6.2.1",
|
|
64
64
|
"vitest": "^3.0.8",
|
|
65
|
-
"@univerjs-infra/shared": "0.6.
|
|
65
|
+
"@univerjs-infra/shared": "0.6.6"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"test": "vitest run",
|