rich-text
rich-text copied to clipboard
Newline added by astToHtmlString for link object
Hello,
astToHtmlString
method adds a newline (\n) and whitespaces around a link object.
Input richtext object:
{
"children": [
{
"type": "paragraph",
"children": [
{
"text": "Lorem ipsum dolor sit amet, "
},
{
"type": "link",
"href": "https://google.com",
"children": [
{
"text": "consectetur "
}
]
},
{
"text": "adipiscing elit, sed do ..."
}
]
}
]
}
Output:
<p>Lorem ipsum dolor sit amet, \n <a href="https://google.com" target="_self" >\n consectetur \n </a>\n adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>