The link modal now knows which document the edited link is in. The new LinkContext type (link-type-api) carries that document. It's passed to LinkTargetType#fromReference / #toReference, to the LinkTargetTypeManager and to the target fields of the link modal. The XWiki BlockNote integration sets it to the edited document.
The model reference parser can now resolve a reference against a base reference (ModelReferenceParserOptions#base). The serializer can serialize a reference relative to one (ModelReferenceSerializer#serialize(reference, base)).
Page and attachment links are displayed, parsed and saved relative to the edited document. For example, a link to a page in the same space is saved as Page, not xwiki:Space.Page. When you edit a link, the editor matches it to its reference whether that reference is written in full or relative to the document.
The XWiki model reference serializer and parser now use the same format as the default server-side entity reference serializer and resolver, e.g. wiki:Space.Page@file.png. Previously the serializer put the resource type (doc:, attach:, space:) in front of the entity reference, and the parser went through the resource reference parser. Now the entity type is passed to the parser when the reference isn't a page reference.
As a result, the code that stripped this prefix is gone: in the link target types, the link target fields and the realtime collaboration room name.
This also fixes the page hierarchy REST URL, which was built from doc:wiki:Space.Page.
The image selector now parses a typed reference as an attachment reference. Before, it parsed it as a page reference.
An uploaded image is inserted with an untyped attachment reference, the same as the image suggestions.
Removed the unused LinkEditionContext from blocknote-react.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.