Re:Show HN: Jotted – jsfiddle for self-hosted client-side demos
by simple10 on Thursday January 14, 2016 @12:21PM
(#10902765)
Super useful. Now I just need to wire it up to S3 to have a self hosted jsfiddle.
[ Parent
| on HN ]
Re:Show HN: Jotted – jsfiddle for self-hosted client-side demos
by ghinda on Thursday January 14, 2016 @03:58PM
(#10904434)
Sure, because of the plugin support it shouldn't get too complicated.
You can use strings instead of urls, for files. So you could do something like:
loadFromS3(function (fileContent) {
j = new Jotted($container, {
files: [ type: 'css', content: fileContent ]
})
})
then create a plugin for it that saves the changes back to s3: j.done('change', function (err, params) {
saveToS3(params.content)
})
Here's some details about the plugin api:
https://github.com/ghinda/jotted#plugin-api