-5

I was wondering if Stack Snippets have an option to toggle the display of the code for the snippet but have the Run code snippet button visible?

4
  • Why the down-votes? Why is this a poor question? Commented May 31, 2016 at 17:57
  • Downvotes are different on Meta -- here they mostly mean disagreement. Commented May 31, 2016 at 18:00
  • Indeed your question is tagged [support], but the second paragraph looks a lot like a feature request. And support questions can be downvoted too. Anyway, in case you haven't noticed, Meta votes do not impact your rep. Commented May 31, 2016 at 18:03
  • @FrédéricHamidi Yes I know, I've been on the meta before. The second paragraph is just stating a situation where it would be useful. I don't know if it's possible, hence why I am asking. Commented May 31, 2016 at 18:04

2 Answers 2

10

No; that'd pretty much be an invitation for dirty tricks and nasty surprises.

The purpose of snippets is to allow running code that's included for demonstration purposes; you should expect that readers wishing to run the code will also want to see it in context.

5
  • "that'd pretty much be an invitation for dirty tricks and nasty surprises", how so? Commented May 31, 2016 at 18:56
  • 1
    By implying that the code which would be run is other than that which would actually be run.
    – Shog9 Mod
    Commented May 31, 2016 at 20:50
  • I could give code snippets, then use a JSfiddle with different code. Same situation, besides it's only toggled. There is really no difference between that and "Show Stack Snippet". That really isn't a problem, people can lie, and would be down-voted anyways. Commented May 31, 2016 at 21:44
  • To be honest the other than "No", the rest of this is a rant/opinion, and not helpful to the question. You really should not be immediately assuming bad intentions. Commented May 31, 2016 at 22:14
  • 1
    I'm not assuming anything about your intentions. But it would be negligent of me to assume good intentions of everyone who could potentially make use of this feature.
    – Shog9 Mod
    Commented Jun 1, 2016 at 1:16
2

Currently Stack Snippets do not support such functionality without harming the functionality of the snippet. Although in the Feedback Requested: Runnable Stack Snippets, there is feedback covering this problem. As of right now there is no way to hide code that an answerer may feel is boilerplate or not entirely necessary to a specific question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .