Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A browser-based live coding environment.
JavaScript CSS Other

Disable auto-close/auto-fill during recording playback/seeking.

All text that was typed	and auto-filled	when recording a talk-through
gets saved as commands.	When playing back those commands if auto-fill
is enabled the auto-filled text	can remain when pausing or seeking b/c
the text is essentially	added twice: once from the commands and	once
from autofill. In order to correct this we disable auto-fill during
playback and seek operations.

Test Plan:
- run "gulp test_record" to grab recording-data.json from S3
- run "tests/record/index.html", re-run any failed suites in isolation
- create a new pjs recording and type the following text
   rect (100, 100, 100, 100);
   draw = function() {
       fill(mouseX, mouseY, mouseY);
- play the recording back and pause after the start of the `fill` command
- jump to various locations and make sure that there's never any extra text like:
   fill(mouseX, mouseY, mouseY);255, 0, 0);

Reviewers: pamela

Subscribers: john

Differential Revision:
latest commit 85def8f51b
@kevinb7 kevinb7 authored
Failed to load latest commit information.
build Disable auto-close/auto-fill during recording playback/seeking.
css Restrain error buddy's "hmm" to one line
demos fixes scrubbing in non pjs environments
external Convert tabs to spaces in color-picker.js.
images Changed location of images
js Disable auto-close/auto-fill during recording playback/seeking.
sounds New sounds for "retro" sound set for getSound
tests Add a placeholder version to maintain the current version at version 4.
testutil revert timeout back to 5 minutes so the tests can complete
tmpl Cleanup lint errors picked up when updating substate in webapp
utils Cleanup lint errors picked up when updating substate in webapp
.arcconfig Add back the "userChangedCode" event, for bingo'ing an badge'ing purp…
.arclint add default .arclint file
.gitignore Remove need for symlinks entirely.
.gitmodules switch from the "stepper" repo to its new name: "debugger"
.travis.yml Specify a "good" version of Firefox for the test to run on.
LICENSE Added LICENSE update the `git submodule update` command
bower.json bump deps and rebuild because some of the deps had 2 space tabs becau…
build-paths.json split resource caching into a separate module, pjs-resource-cache.js,…
check.js fix the suggested command for checkout out submodules
gulpfile.js Force rebuild files before watching.
lint_blacklist.txt Cleanup lint errors picked up when updating substate in webapp
package.json Run iframe tests using phantomjs

Live Code Editor

This is the live coding environment developed for the Khan Academy Computer Programming curriculum. It gives learners an editor on the left (either ACE or our Blocks-based drag-and-drop editor) and an output on the right (either JS+ProcessingJS, HTML, or SQL).

You can find various demos in the demos/ directory, and start playing immediately with the simple demo:


In order to run live-editor locally you'll have run a local web server. If you have python installed this can be accomplished by running the following command from the live-editor folder:

python -m SimpleHTTPServer

You should see the following console output:

Serving HTTP on port 8000 ...

Open up a browser and navigate to


You can use the pre-built copies of everything inside the build/ directory. If you wish to make some changes and re-build the library from scratch you'll need to install some dependencies:

git submodule update --init --recursive
npm install
bower install

# Build the Ace editor files (This is usually *not* needed)
cd bower_components/ace
npm install
node Makefile.dryice.js -nc

At this point you can make a fresh build, using Gulp:

# Or if not installed globally:

If you have an issue with "this.merge" is undefined, then rm -rf node_modules/gulp-handlebars/node_modules/handlebars.


The tests are in the /tests folder. They use Mocha/Chai/Sinon. Gulp typically runs the tests when relevant files change, but you can explicitly run the tests with:

node_modules/gulp/bin/gulp.js test

Please add tests whenever possible for any change that you make or propose.

How you can help

We have many open issues here. The top priority are those marked as regressionbug, since those are things that used to work. After that, the ones marked as browserbug may be the easiest to take on, and there are also plain old bugs. All the issues are tagged according to their environment, pjs, webpage, sql, or if they're generally about the ACE editor, editor. There are also a few bugs specifically about the demo pages, since those can get behind, and requests for more tests, since we can always use more of those!

Some aspects of the editor are in subrepos with their own issue trackers, like structuredjs and structuredblocks, so be sure to poke around those and see if they're more up your bug-fixing alley.

There are also a handful of ideas floating here from our community. You are welcome to take them on, but it's possible we won't merge them if we worry about their effect on the programming experience on Khan Academy, like if they may introduce backwards compatibilities or performance regressions.

We have no full-time resource working on the editing environment right now, so we will do pull requests when we find ourselves with time between other projects. We thank you for your contribution, even if we may be slow to acknowledge it at times. :)

How it works

For a deep dive into the components of the LiveEditor, read this wiki.

You can also watch these talks that the team has given about the editor:

Something went wrong with that request. Please try again.