24 Jun 2022 | Updated 31 Oct 2022
By vadim
72 2
Table of Contents
The original Google Document is located here
. Edit it to publish changes on Holdex threads.
Quotes Plan is nothing, planning is everything!
We look forward to hosting the best Web3 teams from across the world in the Bahamas in January. This is a great opportunity for scale-ups to pitch in front of VCs and more than 3,000 industry professionals – Anthony Sar, CEO at Finoverse.
Links Single link element This link must be a plain text in Google doc
https://holdex.io
{
- "endIndex" : 47,
- "startIndex" : 28,
- "textRun" : {
- "content" : "\u000bhttps://holdex.io\n",
- "textStyle" : {
-
- }
- }
- }
- ],
- "paragraphStyle" : {
- "direction" : "LEFT_TO_RIGHT",
- "namedStyleType" : "NORMAL_TEXT"
- }
- } }, {
- "paragraph" : {
- "elements" : [
- {
- "textRun" : {
- "textStyle" : {
-
- },
- "content" : "\n"
- },
- "startIndex" : 47,
- "endIndex" : 48
- }
- ],
- "paragraphStyle" : {
- "namedStyleType" : "NORMAL_TEXT",
- "direction" : "LEFT_TO_RIGHT"
- }
- },
- "startIndex" : 47,
- "endIndex" : 48 }, With custom text anchor Link must be surrounded by text, otherwise it will be rendered as Rich Snippet
Example of the link
Rich snippet Example 1 " paragraph ": {
" elements ": [{
"textRun": {
"content": "Hyperlink",
"textStyle": {
"foregroundColor": {
"color": {
"rgbColor": {
"blue": 0.8,
"red": 0.06666667,
"green": 0.33333334
}
}
},
"underline": true,
"link": {
"url": "https://holdex.io"
}
}
},
"startIndex": 1,
"endIndex": 10
}, {
"startIndex": 10,
"endIndex": 11,
"textRun": {
"content": "\n",
"textStyle": {}
}
}],
"paragraphStyle": {
"direction": "LEFT_TO_RIGHT",
"namedStyleType": "NORMAL_TEXT"
}
}
Example 2 { "endIndex" : 47, "startIndex" : 11, "paragraph" : {
- "elements" : [
- {
- "textRun" : {
- "content" : "https://holdex.io",
- "textStyle" : {
- "foregroundColor" : {
- "color" : {
- "rgbColor" : {
- "blue" : 0.8,
- "red" : 0.06666667,
- "green" : 0.33333334
- }
- }
- },
- "link" : {
- "url" : "https://holdex.io"
- },
- "underline" : true
- }
- },
- "startIndex" : 11,
- "endIndex" : 28
- },
- Proposed algorithm to handle links rendering ```if (paragraph.elements.length == 2 && paragraph.elements[1].textRun.content == “\n”)
then isSingleElement = true
if (isSingleElement == true && typeof paragraph.elements[0].textRun.textStyle.link !== “undefined”)
then isSimpleLink = true
if (isSimpleLink == true)
then renderAsSimpleLink() else
if stringHasSpace(paragraph.elements[0].textRun.content == true)
then isNotWidget == true
if (isSingleElement == true && isSimpleLink == false && isNotWidget == false)
Then runRegExToDeFineTypeOfWidget_for_Example_RichLink_or_Youtube
```
Use the `Export document` feature to copy the json.
https://www.freeformatter.com/json-escape.html
-> Unescape JSON