Add settings file for quick configuration by people outside KA
Opened this issue · 5 comments
KhanAcademy live editor is a great editor, and many would love to use it outside of KhanAcademy.
For example, I am teaching web development to some students here. Since I am already assigning the KhanAcademy web courses to them, I would love to have a place where KhanAcademy live editor could run in the browser, and they could run their code using that, since they're already used to it.
I can do something of that sort, and I wouldn't mind programming part of it to be able to open files and such.
But the KA Live editor, being built for KA, has a lot of restrictions that are unnecessary and even hindering for this setting.
It would be nice to have some sort of a settings file in the build that would allow me and others to easily set the permissions.
I agree that it'd be great to make it easier for folks to use LiveEditor outside of KA. We currently have very limited engineering resources (~10% of my time), so our engineering time is spent on regression bug fixes and improvements to help this editor work inside the increasingly changing KA codebase. (For example, I am very slowly working on a branch that ports this codebase to webpack/React - you can check out that branch to see if it's easier for you to configure).
You're welcome to send pull requests, and we'll try to review them when we have the time.
In the classroom setting, I've also used jsbin.com and repl.it for HTML/CSS classes, as they've got a large full screen UI. Not as much error reporting, but I find they work well enough once students have gotten past the beginner course.
Thanks for the quick reply! I'll try out JSBin; it looks like a great option.
And in my free time I'll try to work on making pull requests. I'm already working on trying to update ES6 syntax consistency, so I might as well throw that in.
Do you think you might be able to point me in the direction where I might find the code that enforces the restrictions?
I can look for it, and I remember seeing something somewhere, but the build
directory is a bit different.
I assume for loop protection I can just go to build/js/output/shared/loop-protector.js
Update: I was able to disable the loop protector whenever something involvinig KhanAcademy is not found in the URL. Now that I think of it though, the loop protector could be a very useful thing. Maybe I should just increase the timeout instead.
Still working on the blocked HTTP requests from outside sources. Thankfully it was very easier to do a simple HTML file upload using the liveEditor.editor.text();
function, so I'm getting pretty close.