We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3c5b13 commit 735b311Copy full SHA for 735b311
src/src/util/ui.js
@@ -23,6 +23,23 @@ define([
23
24
var $dialog;
25
26
+ exports.showCode = function(opts) {
27
+ var opts = Object.assign({
28
+ mode: 'json',
29
+ content: '',
30
+ width: 800,
31
+ height: 600
32
+ }, opts);
33
+ require(['ace/ace'], function (ace) {
34
+ var id = Util.getNextUniqueId(true);
35
+ exports.dialog($(`<div style="width: 100%; height: 100%;" id="${id}"></div>`), opts);
36
+ var editor = ace.edit(id);
37
+ var mode = './mode/' + opts.mode;
38
+ editor.getSession().setMode(mode);
39
+ editor.setValue(opts.content, -1);
40
+ });
41
+ };
42
+
43
exports.enterValue = function (opts) {
44
opts = opts || {};
45
const defaultOptions = {
0 commit comments