Better editor placeholder text

In the Rstudio discourse, when I try to write a new post it shows this helpful snipper. Perhaps we just need to set this up

23 Likes

Oh man, apparently I liked this idea a long time ago, but never went about figuring out how to do it. Seeing it again inspired me to fiddle with our placeholder a bit (your cache may need to be purged to see the changes), but I couldn’t figure out how they did newlines (yet). So here’s what I just changed it to for now:

Type here. Use the button bar or Markdown for formatting; `backticks` are handy for inline code or use ``` around larger code blocks.

I figured we don’t need to tell folks about BBCode or HTML and code formatting is far more important than images.

So I looked into customizing this more — and it seems the builtin discourse customizations available to me are indeed limited to a single line: New lines in the composer's reply placeholder? - support - Discourse Meta

Now, that said, as pointed to me in the above thread, we could provide topic templates. This would act like GitHub issue templates — it’d just be prepopulated text in the compose window (instead of a shadowed placeholder). Or we could do some theme hacking and try to get a placeholder like the R one above.

One of the nice things about topic templates is that they just appear on creating a new topic — and they can be customized based on the selected category.

3 Likes

Could I nominate the #domain:ml category as a guinea pig for these topic templates? It’s almost exclusively Q&A help, and I find a lot of new posters aren’t caught by Please read: make it easier to help you. IMO having a link to the PSA topic pre-populated in the editor (i.e. one that needs to be manually deleted) would improve the overall quality of topics.

3 Likes