Try CodeJar

A code editor for the browser. site github

pages/try-codejar

The editor launches with code saved in the page json. If this isn't available, we fetch the sample-one.js module as text. This same file has been imported as a module and run before we start editing.

http://ward.dojo.fed.wiki/assets/pages/try-codejar/sample-one.html HEIGHT 400

We've created three button handlers showing three ways we can put the edited code to work. These are included in sample-one.html along with the code required to run the CodeJar editor. >> button click handler

item.code = jar.toString(); frame.open(page,event.shiftKey)

const code = jar.toString(); frame.download(code, 'sample-one.js', 'text/javascript')

window.result.innerText = '' const code = jar.toString(); const module = await import(`data:text/javascript;base64,${btoa(code)}`) module.doit(value => window.result.innerText += value)

.

The necessary complexity here is immense, and this post only scratches the very surface of it. If anything, it's a miracle of the simplicity of modern programming that we're able to just slap down a <textarea> on a web page and instantly provide a text input for every internet user around the globe. post

We imagine this being integrated with the Asset folders and maybe managed with a javascript version of git. site