This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-4fa5d382-a234-444a-b97b-dbc6d63c6f0e XWIKI-25744 Open

External links are not distinguished from internal links when editing with BlockNote

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-91944362-8b6d-4f3d-8cd5-b88ddce4fa2c Marius Dumitru Florea created this issue on 12/Nov/26 16:55
 
Summary: External links are not distinguished from internal links when editing with BlockNote
Issue Type: cid:jira-generated-image-avatar-4fa5d382-a234-444a-b97b-dbc6d63c6f0e Bug
Affects Versions: 17.10.0
Assignee: Unassigned
Components: BlockNote
Created: 12/Nov/26 16:55
Priority: cid:jira-generated-image-static-major-cd6c0479-ac7e-480c-ba4e-9a3deb6df1de Major
Reporter: Marius Dumitru Florea
Description:

XWiki styles external links differently from links to wiki pages and attachments, so that users can tell them apart: in view mode they get the wikiexternallink class and in the WYSIWYG editor they get the data-linktype="external" attribute, both of which add an "external link" icon (see general.less in the Flamingo skin).

When editing with BlockNote, links are rendered without this attribute, so external links look exactly like internal ones and users can no longer distinguish them while editing.

Steps to reproduce

  1. Create a page with a link to a wiki page and a link to an external URL, e.g. https://www.xwiki.org
  2. View the page: the external link has the external link icon
  3. Edit the page with BlockNote

Expected

The external link has the external link icon, as in view mode and in the CKEditor-based WYSIWYG editor.

Actual

Both links look the same.

Notes

BlockNote renders the links itself and didn't allow customizing them, see https://github.com/TypeCellOS/BlockNote/issues/1118 . https://github.com/TypeCellOS/BlockNote/pull/2666 adds a links.HTMLAttributes editor option, but these attributes are applied to all links, so it may not be enough on its own to mark only the external links.