Insert placeholder text in post while uploading


(Erlend Sogge Heggen) #1

GitHub’s upload dialog has a handy placeholder in the editor while your upload is being processed:

In Discourse I tend to take my fingers off the keyboard as long as I’m downloading something, because the download link will be inserted wherever my cursor is at the time.

(Jeff Atwood) #2

Sure, not a bad idea, up to @zogstrip. If it is hard may need to wait for a future release.

(Régis Hanol) #3

Just pushed the upload placeholder :bird:

(Jeff Atwood) #4

Works! Looks like this:

Very nice improvement, excellent suggestion @erlend_sh

(Erlend Sogge Heggen) #5


Funnily enough I think your server was running an update of sorts just now, because my first test pic uploaded perfectly, but then the updates were constantly stalling, both here and on Try (page loads were also slow, so I’m pretty sure it was server). Perfectly fine and snappy again now.

Because I happened to experience a longer than usual loading time, I did notice a few minor quirks, but both might be quite hard to do anything about:

  • Cancelling the upload doesn’t remove the inserted upload placeholder text. I can see why this might be tricky.
  • GitHub doesn’t even offer a cancel option…
  • If the upload is finished in the background while the smiley selector is open, my smiley will be inserted into the image link, breaking it.
  • Interestingly, following those same steps in GitHub ends with no smiley being inserted. Maybe they encountered this too, and solved it.

(Erlend Sogge Heggen) #6

Kind of edge case, but I noticed that if you’re typing something above the placeholder, your typing position will be forced to the end of the placeholder when it finishes. Like:

I'm typing something above this image and sudd
<img src="//" width="690" height="215"> enly it's continued here.

(Régis Hanol) #7

That’s now fixed with

(Régis Hanol) #8

This is now fixed :strawberry:

(Jeff Atwood) #9