Tuleap Community Edition development and releases are no longer public. You have until September 30th to download packages and sources in Tuleap project. You can contact the team if you need further assistance.

    •  
      request #40440 Not url-ish content can be transformed into link in prose-mirror-editor
    Infos
    #40440
    Thomas Gorka (tgorka)
    2024-11-08 15:40
    2024-11-08 12:15
    42180
    Details
    Not url-ish content can be transformed into link in prose-mirror-editor

    In @tuleap/prose-mirror-editor, there is a plugin "AutomagicLinks" whose role is to detect whenever the user typed a url (+ a space char) and wrap it in a link mark.

    However, the strategy it uses does not work, because whatever text that do not make the URL constructor throw an error is considered to be a valid url:

     

    2745-image%286%29.png

    In the example above, the URL constructor did not throw any error because the text contained a colon (:) character, so the plugin transformed it into a hyperlink.

    Let's instead use a custom InputRule with a proper regexp.

    Artidoc
    16.0
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gorka (tgorka)
    Closed
    2024-11-08
    Attachments
    References
    Referenced by request #40440

    Follow-ups