Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
18.1.0-rc-1
-
None
-
Unknown
-
Description
Create a page with this content:
https://www.xwiki.org [[Some.Page||anchor="Heading" queryString="foo=bar"]] attach:file.pdf [[label>>path:to/file.txt]]
Edit with BlockNote. Only the last link, that has a non-generated label is visible. On save, only the last link is preserved.
The root cause is that the generated link label is not included in the UniAst syntax. We need to pass it as custom link block metadata. This is what we provide to BlockNote currently:
{
"blocks" : [ {
"type" : "paragraph",
"styles" : { },
"content" : [ {
"type" : "link",
"content" : [ ],
"target" : {
"type" : "external",
"url" : "https://www.xwiki.org"
}
}, {
"type" : "text",
"styles" : { },
"content" : " "
}, {
"type" : "link",
"content" : [ ],
"target" : {
"type" : "internal",
"rawReference" : "Some.Page"
}
}, {
"type" : "text",
"styles" : { },
"content" : " "
}, {
"type" : "link",
"content" : [ ],
"target" : {
"type" : "internal",
"rawReference" : "attach:file.pdf"
}
}, {
"type" : "text",
"styles" : { },
"content" : " "
}, {
"type" : "link",
"content" : [ {
"type" : "text",
"styles" : { },
"content" : "label"
} ],
"target" : {
"type" : "external",
"url" : "path:to/file.txt"
}
} ]
} ]
}