20

The Stack Snippet icon in the Staging Ground editor inserts a code block instead. The Markdown preview mode doesn't render Stack Snippets, either.

6
  • 5
    possibly related or even a dupe: "How do I make a code snippet with the new editor? Where did the button go?"
    – Kevin B
    Commented Jun 4 at 19:36
  • 13
    This is a huge issue. We can't help users or explain to them to add one when one is called for because it's entirely broken in SG. Better if they just bring the traditional editor to SG; it's far superior.
    – TylerH
    Commented Jun 4 at 19:36
  • Related: How am I supposed to save my edit? There is no "Save edits" button anywhere and Enter et al. doesn't do anything.
    – InSync
    Commented Jun 4 at 22:26
  • @InSync If you make a comment first, it seems to work normally; otherwise, you have to choose an option on the right hand side to make them save. (That should probably be a separate question.)
    – wizzwizz4
    Commented Jun 4 at 22:27
  • I did post a comment, but it seems that when a question enters the "Re-evaluate" period the old comment no longer counts. Thanks anyway.
    – InSync
    Commented Jun 4 at 22:29
  • 5
    I decided to add the markup for the stack snippet manually and now the run button doesn't show up. Commented Jun 10 at 6:08

1 Answer 1

7

We are making comments requiring a MRE, with a link to where it tells you to make a Stack Snippet.

If you are using HTML, CSS, and/or JavaScript, you can use Stack Snippets to include runnable snippet instead of just a static code block.

Until now, I didn't even notice that they can't even make a snippet, until I tried to edit code into one.
This is a bad experience for both the questioners and reviewers.

And as Abdul Aziz Barkat already pointed out, even if you add the snippet markup manually, it still doesn't make a runnable snippet.
It makes a snippet box, but no "Run code snippet" button. no button Even weirder, the button is there and functional in the revisions. button

How did this make it into production?

2
  • You can run StackExchange.snippets.init() in console which will add the run button in Staging Ground. I'm not really sure that "How did this make it into production?" is fair here... StackSnippets aren't supported in SG through the new editor so it makes sense that they wouldn't be initialised client-side on those pages. OTOH, the revisions page is the standard endpoint for all posts (which do support Snippets so they're initialised). The server-side renderer is also the standard for all posts (which also support Snippets so it sends back the correct HTML response for the snippet markdown).
    – Henry Ecker Mod
    Commented Aug 25 at 2:39
  • 3
    I agree that the Stacks editor should support StacksSnippets and I really really wish they hadn't used it for new users while missing such a critical feature for this site. But the current configuration of not having the client-side support in place for an unimplemented feature seems... expected?
    – Henry Ecker Mod
    Commented Aug 25 at 2:40

You must log in to answer this question.

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