I often times like to put a link to jsfiddle in my question or answer. I typically also put my code in a javascript html css snippet. however when I attempt to do this I often receive the error that js fiddle must be accompanied by code. however the code is in the runnable snippet. is this the expected behavior? must I put the code in an additional now third time (fiddle, snippet, and code sample)
-
5i think it's detecting the jsfiddle link by itself and ignoring the JS/HTML/CSS Snippet when looking for a code sample. since the Snippet is executable anyway it might be redundant to include a jsfiddle link anyway– Memor-XCommented Jan 27, 2017 at 1:55
-
what's the value of the fiddle and the snippet? If it is the same code, why do you need both?– psubsee2003Commented Jan 27, 2017 at 1:57
-
2I do it as a preference I know some like to work with the fiddle directly and save off their edits if they make any, where others prefer not to leave the stack overflow site and run the executable– Bryan DellingerCommented Jan 27, 2017 at 1:58
-
so assuming by the downvotes that this is indeed expected behavior and attempting to add both a fiddle and a code snippet is frowned upon, I personally disagree with that sentiment.– Bryan DellingerCommented Jan 27, 2017 at 2:04
-
I may have read this a bit too fast - are you using both a fiddle and a Stack Snippet? If so, why when the snippet accomplishes what a fiddle would?– MakotoCommented Jan 27, 2017 at 2:10
-
One inconvenience of using both is that it makes it necessary to do any edits to the code in two places.– duplodeCommented Jan 27, 2017 at 2:12
-
2I personally prefer jsfiddle and I like to make edits and save off different versions of an answer, I know that others prefer not to leave the stack overflow site, or can not leave the site as fiddle is blocked. so I was just trying to provide options to the user. I think that is reasonable– Bryan DellingerCommented Jan 27, 2017 at 2:13
-
Hrm. I think I see the issue...– MakotoCommented Jan 27, 2017 at 2:14
-
i wonder, maybe you could add the link to the JS/HTML/CSS Snippet in which it is separate from the code yet clicking it will open jsfiddle, or put the link in a code block itself since people who want to fiddle with the code are already going to do some extra work any so what's a little more– Memor-XCommented Jan 27, 2017 at 2:22
-
@Makoto: See meta.stackoverflow.com/questions/306455/…– BoltClockCommented Jan 27, 2017 at 4:13
-
@Memor-X: "put the link in a code block itself" That's going to get either your post deleted or the link edited out.– BoltClockCommented Jan 27, 2017 at 4:14
-
here is an example stackoverflow.com/questions/41872110/… I ended up just putting some of the code in the code block, but it still seems like overkill to me.– Bryan DellingerCommented Jan 27, 2017 at 4:26
-
1@Bryan Dellinger: OK, so... I tried editing out your code block and it worked. Now I'm flummoxed.– BoltClockCommented Jan 27, 2017 at 4:30
-
yes I've noticed that as well on the original post if you attempt to save with only the fiddle and the snippet you get the error, however if you save and then edit and delete it will let you get rid of the code block. so it is odd. If you make a quick new question put a hello world fiddle and a hello world snippet and try to save you will see the error.– Bryan DellingerCommented Jan 27, 2017 at 4:31
-
I'm pretty sure that's a bug, then.– BoltClockCommented Jan 27, 2017 at 4:40
|
Show 1 more comment
1 Answer
Some people prefer jsFiddle's workflow. Hey some people juggle geese...*
Kidding aside I'm fairly sure that this a bug. I've answered more than a few questions with fiddles followed by snippets without incident.
*Note I also enjoy both geese juggling and jsFiddle. Old habits are hard to change.