Scenario with Editor Terminal UI

The Katacoda editor-terminal UI Layout combines an Editor with a Terminal. When changes are made to files using the editor, they are automatically sync'ed to the user's home directory.


It's possible to pre-open a set of files by defining a files array in the root of the index.json file.

"files": [ "app.js", "index.js" ]

The syntax for the editor is automatically inferred from the file extension. This can be enforced by including a "uisettings"

"environment": { "uilayout": "editor-terminal", "uisettings": "javascript" },

Helper Functionality

To support users, Katacoda has integrated various features to help users.

Copy file to editor:

var http = require('http'); var requestListener = function (req, res) { res.writeHead(200); res.end('Hello, World!'); }

var server = http.createServer(requestListener);
server.listen(3000, function() { console.log("Listening on port 3000")});
The following snippet will prepend the contents of the editor: console.log("Starting...") Within the Markdown, include:

The following snippet will append the contents of the editor:


Within the Markdown, include:


The editor can copy to particular files based on the data-filename attribute:

console.log("Index.js here...")

Within the Markdown, include:

console.log("Index.js here...")

New Files

Create a new file via the CLI: touch newFile.js{{execute}}

The Markdown is:

touch newFile.js

This can then be opened: newFile.js{{open}}

The Markdown is: