diff --git a/package.json b/package.json index 345db7f75..671985b6b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "codemirror": "^4.2.0", - "codemirror-console-ui": "^0.1.0", + "codemirror-console-ui": "^0.1.3", "jquery": "^2.1.1", "w3c-xmlhttprequest": "~1.1.0", "ypromise": "~0.2" diff --git a/public/js/editor.js b/public/js/editor.js index 48e224ffb..2c20b520b 100644 --- a/public/js/editor.js +++ b/public/js/editor.js @@ -3,8 +3,12 @@ * LICENSE : MIT */ "use strict"; +var Promise = require("ypromise"); module.exports.initilize = function () { var consoleUI = require("codemirror-console-ui"); + consoleUI.setUserContext({ + Promise: Promise + }); var codeBlocks = document.querySelectorAll("div.listingblock"); for (var i = 0; i < codeBlocks.length; i++) { var codeBlock = codeBlocks[i];