Add a regular link if a file was inserted instead of an image#1966
Add a regular link if a file was inserted instead of an image#1966juliusknorr merged 1 commit intomasterfrom
Conversation
jancborchardt
left a comment
There was a problem hiding this comment.
Very cool, looks nice! :)
12aa6dc to
de1da72
Compare
|
Maybe we could even not insert an image into the markdown file for non-image mimetypes but just a link text/src/components/MenuBar.vue Line 290 in 93e3a09 The fileInfo should already contain the mimetype, so it would just require to not only pass the image command in text/src/components/MenuBar.vue Line 180 in 93e3a09 |
|
If the only way to insert a non-image file is via the "insert image" button then I think it's better to restrict the mimetypes in the filepicker dialog and avoid this use case. If inserting a non-image file is a feature we want, it could be clearer to trigger it with another menu button for example (although we already have a lot of them). I also like the solution mentioned by @juliushaertl. We could trigger a different action depending on the selected file mimetype. But then we need to make it explicit in the UI that it's possible to insert all kind of files and not just images. |
mejo-
left a comment
There was a problem hiding this comment.
Works pretty well, thank you :)
In general, I agree with you both. But given that inserting non-image files through the "Insert image" action right now, I'd consider it a regression if we dropped support for it. And as long as we don't have a proper "Link file" dialog, I think that @luka-nextcloud's change is an improvement over the current situation. Don't you think so? |
|
Yes, I'm also fine to get this in and handle the inserting separately 👍 Nice work @luka-nextcloud |
|
Mind to rebase and push the updated js bundles again? 🙈 |
de1da72 to
0e163db
Compare
Signed-off-by: Luka Trovic <[email protected]>
0e163db to
1119bbf
Compare
Signed-off-by: Luka Trovic [email protected]
Resolves: ✨ Text app design review #1075
If a file is inserted just add a regular linkTarget version: master
Summary
If a file is inserted instead of an image, just add a regular link.
