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

Support links with generated labels in the BlockNote link modal

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 18.10.0-rc-1
    • 18.9.0
    • BlockNote
    • None
    • Integration
    • Unknown

    Description

      XWiki Rendering supports links without a label of their own, whose label is generated from the link target when the content is rendered (e.g. [[doc:Space.Page]] rather than [[label>>doc:Space.Page]]). The BlockNote editor shows the generated label of such a link and saves the link without it, as long as the label is left untouched in the edited content. The BlockNote link modal doesn't support generated labels though:

      • When editing a link with a generated label, the display text field is pre-filled with the generated label, as if the user had chosen it. Changing the link target then keeps the old label in the editor, which no longer matches the new target.
      • When the user types a display text for a link with a generated label, the link is still saved without a label if the typed text happens to be the same as the generated one.
      • When a link is created or edited with an empty display text, the link label is generated from the link target in the editor, but it's saved in the wiki syntax as a label of its own, e.g. [[Page Title>>doc:Space.Page]] instead of [[doc:Space.Page]].

      The link modal should instead:

      • leave the display text field empty when editing a link with a generated label (showing the generated label as placeholder), so that the label follows the link target;
      • save a link with a non-empty display text with that label, even when it's the same as the generated one;
      • save a link submitted with an empty display text, created or edited, without a label, so that its label is generated server-side.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: