Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a local file in JSfiddle?

Tags:

I did a Google search and couldn't find anything relevant to this topic. If I have a link

ex:

<a href="1.html"> 

in my HTML document then how to add 1.html to jsfiddle so that it can provide a link to the file..?? I know there is an external file tab in JSfiddle button but I guess it is for URL. Mine is a local file. Any help would be much appreciated.

I also know that we can upload anything to JSfiddle. Then how can apply my link or what service like postimg.org can I use to link my external file

like image 916
shet_tayyy Avatar asked Jan 10 '14 14:01

shet_tayyy


People also ask

How do you save a JSFiddle file?

Usually there would be a Save or Fork button in the top left next to Run. CTRL + S would normally also work. According to the jsFiddle Twitter, they're having problems with spammers so they've temporarily disabled the feature.

How do I use JSFiddle?

Entering and running code JSFiddle has the notion of panels (or tabs if you switch into the tabbed layout), there are 4 panels, 3 where you can enter code, and 1 to see the result. Once you enter code, just hit Run in the top actions bar, and the fourth panel with results will appear.

What does the tidy button do in JSFiddle?

You can press the Tidy button on the top panel at any time and align all the lines automatically.

How do I find my JSFiddle?

Click on your profile -> dashbord : http://jsfiddle.net/user/dashboard/ then select your saved code. So simple.


2 Answers

You could use orionhub.org to host your file, link to it from fiddle. On Orion, you'd have to create the project, add file to it, make the file visible to the external world as part of that project. It's a bit convoluted at first, but makes sense and you'll get used to it.

Detailed steps for making certain resource publicly available via Orion:

  1. Import/create a file
  2. Select View on Site via Open Related menu

enter image description here

  1. Add a site (if not exists) and copy the public link from View

enter image description here

UPDATE 2019/06/26 - codesandbox.io seems to allow file upload, but may not allow hotlinking to it. It might be time to move that altogether. (if the circumstances warrant, of course)

like image 101
vector Avatar answered Sep 29 '22 22:09

vector


I don't think that jsfiddle allows you to upload additional html files -- only other resource files. It also assumes working only with one of the four panes (HTML/CSS/JS).

Instead, you can use a site like Plunker which allows you to add different files of arbitrary types. They will link together: http://plnkr.co/edit/NgdBXGkDDG1nOy47TaSK?p=preview

like image 25
Explosion Pills Avatar answered Sep 29 '22 22:09

Explosion Pills