Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25744

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.0
    • BlockNote
    • None
    • Unknown

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: