Just render rich text
MickL opened this issue · comments
Mick Lawitzke commented
Hello,
I would like to render richtext fields of a page, e.g. I just want to render the "tester":
{
"object": "page",
// ...
"properties": {
// ...
"tester": {
"id": "...",
"type": "rich_text",
"rich_text": [
{
"type": "text",
"text": {
"content": "Hello\n",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Hello\n",
"href": null
},
{
"type": "text",
"text": {
"content": "World",
"link": null
},
"annotations": {
"bold": true,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "World",
"href": null
}
]
},
}
}
Should result into:
Hello<br><strong>World</strong>
Is this possible with this library?
Martin Paucot commented
Hey! It should already be the case
Mick Lawitzke commented
I dont know how. I ended up checking your source code at Github and just copying this function.