Attachment as link improvment #1196

Closed
opened 2026-02-05 00:13:24 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @JtheBAB on GitHub (May 23, 2019).

Describe the feature you'd like
Please add a possibility to create a link within a page that open directly the attachment.

Describe the benefits this feature would bring to BookStack users
Adding attachments to the page is create. But sometimes you want to give more context to it. With a link in the text the user can get the correct attachment during they read the text.

Additional context
It is already possible to to this:
suggestion

Perhaps it is possible that it creates during this process also the link?

Originally created by @JtheBAB on GitHub (May 23, 2019). **Describe the feature you'd like** Please add a possibility to create a link within a page that open directly the attachment. **Describe the benefits this feature would bring to BookStack users** Adding attachments to the page is create. But sometimes you want to give more context to it. With a link in the text the user can get the correct attachment during they read the text. **Additional context** It is already possible to to this: ![suggestion](https://user-images.githubusercontent.com/42135332/58250301-6289ab80-7d61-11e9-8944-c8923ee49748.gif) Perhaps it is possible that it creates during this process also the link?
Author
Owner

@ssddanbrown commented on GitHub (May 25, 2019):

Thanks for the suggestion @JtheBAB.

Somewhat related to #591.

@ssddanbrown commented on GitHub (May 25, 2019): Thanks for the suggestion @JtheBAB. Somewhat related to #591.
Author
Owner

@XVilka commented on GitHub (Sep 23, 2019):

Is there any progress towards solution?

@XVilka commented on GitHub (Sep 23, 2019): Is there any progress towards solution?
Author
Owner

@andre-lx commented on GitHub (Nov 6, 2019):

In my opinion, I think that can be better to add a new icon (next to the pencil) to download the file and when you click the link (currently this downloads the file) , creates a link in the text like:

[file name.pdf](/attachments/10)
@andre-lx commented on GitHub (Nov 6, 2019): In my opinion, I think that can be better to add a new icon (next to the pencil) to download the file and when you click the link (currently this downloads the file) , creates a link in the text like: ``` [file name.pdf](/attachments/10) ```
Author
Owner

@gurpal2000 commented on GitHub (May 16, 2020):

That drag drop doesn't work for me. It gives a "no entry/exit" sign. A major blocker to use Bookstack if this or a selector isn't supported. A copy of a link is not good enough as the ip/domain can change. Nor should one have to go into source put a relative link... Please let me know

@gurpal2000 commented on GitHub (May 16, 2020): That drag drop doesn't work for me. It gives a "no entry/exit" sign. A major blocker to use Bookstack if this or a selector isn't supported. A copy of a link is not good enough as the ip/domain can change. Nor should one have to go into source put a relative link... Please let me know
Author
Owner

@ziermmar commented on GitHub (Jun 4, 2020):

+1 from me for this feature. Is there some progress already? Will this be implemented?

@ziermmar commented on GitHub (Jun 4, 2020): +1 from me for this feature. Is there some progress already? Will this be implemented?
Author
Owner

@ssddanbrown commented on GitHub (Sep 13, 2020):

Spent many hours on this for v0.30.0.

Initially tried to implement a drag+drop solution but I could not get a consistent result in all browsers due to the WYSIWYG editor's (TinyMCE) manual, complex handling of various drag+drop/mouse events.

Therefore I've added a button to the attachment cards which inserts a link, with the correct attachment name, into the editor (Both WYSIWYG and Markdown Editors) when clicked.

I've left some of the drag+drop code in still which should still allow you to drag the attachment "card" into your content when using (Any editor in Firefox) or (Markdown editor in any browser).

This will be part of the v0.30 release.

@ssddanbrown commented on GitHub (Sep 13, 2020): Spent many hours on this for v0.30.0. Initially tried to implement a drag+drop solution but I could not get a consistent result in all browsers due to the WYSIWYG editor's (TinyMCE) manual, complex handling of various drag+drop/mouse events. Therefore I've added a button to the attachment cards which inserts a link, with the correct attachment name, into the editor (Both WYSIWYG and Markdown Editors) when clicked. I've left some of the drag+drop code in still which should still allow you to drag the attachment "card" into your content when using (Any editor in Firefox) or (Markdown editor in any browser). This will be part of the v0.30 release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1196