TarEnethil / archivar

Web-based collaborative world building tool for roleplaying groups
1 stars 1 forks source link

Use Media Upload from "Insert media" Sidebar #24

Closed kartoffelus closed 4 years ago

kartoffelus commented 4 years ago

Currently, if I want to insert a picture from the media library into a Markdown Section it has to be uploaded beforehand. An easy workflow improvement would be to add an "Upload" button at the top of the sidebar, open /media/upload in a modal window and refresh the sidebar afterwards.

TarEnethil commented 4 years ago

easyMDE (#28) apparently has some nice callback functions for in-editor image upload. maybe this can be used. see: https://github.com/Ionaru/easy-markdown-editor

TarEnethil commented 4 years ago

Implemented within PR #45.

The markdown editor has a new button, which opens the Media Upload form in a modal window, allowing for asynchronous upload of a file. After a successful upload, you can choose how to add the file to the editor window (Image, Thumbnail or Link, the first two only being available if an image was uploaded).

The media sidebar will be overhauled in another step, but you now don't have to go to the Media-page to upload an image and then back to the previous edit page.