Skip to content

Pasting URLs always causes them to be shortened. #1410

Closed

Description

@ccoles146

Describe the bug

Trying to insert a URL into a Markdown or Plain Text file. The URL is automatically shortened so that it cannot be read. This happens also when I use "paste as plain text" option.
If I type the URL by hand then after a short pause it gets shortened but the link can be removed by pressing Ctrl+Z
In the case of pasting then the link cannot be removed.

Steps to reproduce

  1. Create a new Plain Text File or Markdown file.
  2. Paste in a URL using either Ctrl+V or right-click Paste or right-click Paste as plain text

Expected behavior

The URL is made into links only in Documents not in plain text files. In Markdown files the URL should only be shortened on the "Preview" window and not in the edit window.

Actual behavior

When pasting a URL such as https://outlook.com the URL gets automatically shortened to https://ou... you can neither read nor edit the URL.

Setup

Proxmox 13 with Debian 14 LXC container with Docker Compose installed. Separate container running Caddy reverse proxy.

Details available on request, although I assume this is normal behaviour out of the box.

Additional context

none

Activity

  1. JammingBen commented on Oct 21, 2025

    @JammingBen
    Member

    I cannot reproduce this, but maybe I'm misunderstanding the issue. Are you talking about the standard text editor? Could you please add a screenshot or video?

  2. ccoles146 commented on Oct 22, 2025

    @ccoles146
    Author

    Here you can see in both images. I'm not sure what you mean by standard text editor, but I think that is what I am using, it is not Collabora. I saw that OwnCloud has a setting to change this behaviour but I'm not sure where it is in OpenCloud and if it is the cause. It happens across different Windows computers using Edge or Firefox.

    Image Image
  3. JammingBen commented on Oct 22, 2025

    @JammingBen
    Member

    I still can't reproduce it:

    Image

    There have been some changes to the line break behavior in the editor recently though. Which OpenCloud version are you running?

  4. JammingBen commented on Oct 22, 2025

    @JammingBen
    Member

    Ah, now I got it. For me it only happens with long URLs.

    We'll have to look into it, thanks for reporting! Moving this issue to the Web repository.

  5. moved this from Qualification to Prio <= 3 in OpenCloud Team Boardon Oct 22, 2025
  6. AlexAndBear commented on Oct 22, 2025

    @AlexAndBear
    Member

    Unfortunately this behavior is coming from the link shortening feature via the last md-editor-v3
    update.

    It's not very intuitive, I think we should report it upstream.

    The issue should be reproducible in the vendors example as well

    https://imzbf.github.io/md-editor-v3/en-US

  7. ccoles146 commented on Oct 23, 2025

    @ccoles146
    Author

    I have reported upstream, you can see the exact behaviour direct on the website you posted @AlexAndBear
    Issue is here: imzbf/md-editor-v3#972

  8. AlexAndBear commented on Oct 23, 2025

    @AlexAndBear
    Member

    @ccoles146 Thank you!

  9. ccoles146 commented on Oct 23, 2025

    @ccoles146
    Author

    Apparently there is an option to solve this.

    removing the extension with type='linkShortener' will prevent folding.

    There is some additional detail provided in another issue #951 - Is this something you can make permanent for OpenCloud? Is the same code used for the Plain Text File function? So this would solve both use-cases.

  10. AlexAndBear commented on Oct 23, 2025

    @AlexAndBear
    Member

    Actually we updated the package to have especially that feature. It helps big time when displaying b64 images. Honestly I would wait for a response from md-editor-v3 team

  11. ccoles146 commented on Oct 23, 2025

    @ccoles146
    Author

    That is the response from the developer: imzbf/md-editor-v3#972 (comment)

    Please can you add something on the issue explaining your thoughts because it is a real problem if you cannot read or edit any link longer that say 10 characters. But if by solving one problem you create another problem then it isn't really a solution. I don't know anything about b64 image argument.

  12. ccoles146 commented on Oct 24, 2025

    @ccoles146
    Author

    @AlexAndBear ok, reading the comment more closely you can either turn it off or adjust the threshold, the default threshold is 30, although I counted it at 32. I think it is too short and probably something like 128 or more would be suitable especially as it is unexpected behaviour in an editor. If it could be exposed for the user to decide that would also be an acceptable solution. The exact parameter to change is here: https://imzbf.github.io/md-editor-v3/en-US/api/#%E2%8F%B2%20autoFoldThreshold . Thanks.

  13. AlexAndBear commented on Oct 24, 2025

    @AlexAndBear
    Member

    Thank you for your research, I will have a closer look as soon as time permits 🙏

  14. self-assigned this
    on Oct 24, 2025
  15. AlexAndBear commented on Oct 24, 2025

    @AlexAndBear
    Member

    @ccoles146 I created a PR which will shorten links, if they are longer than 120chars instead of 30. I also asked the developer of the editor if it will be possible to edit shorten links in the future

  16. AlexAndBear commented on Oct 24, 2025

    @AlexAndBear
    Member

    @ccoles146 I also disabled this feature entireley for plain txt files. I think we are in a good state now.

    Thanks for helping 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions