Skip to content

Commit ab5ba6b

Browse files
committed
Return editor instance from bootstrap function
1 parent 3d9c395 commit ab5ba6b

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

js/run.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ function setupTextarea(el, opts)
576576
}
577577
});
578578
});
579+
return editor;
579580
};
580581

581582

js/run_examples.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ $(document).ready(function()
9090
var parent = $(this).parent();
9191
var btnParent = parent.parent().children(".d_example_buttons");
9292
var outputDiv = parent.parent().children(".d_code_output");
93-
setupTextarea(this, {
94-
parent: btnParent,
95-
outputDiv: outputDiv,
96-
stdin: false,
97-
args: false,
98-
transformOutput: wrapIntoMain,
99-
defaultOutput: "All tests passed",
100-
keepCode: true,
101-
outputHeight: "auto"
102-
});
93+
var editor = setupTextarea(this, {
94+
parent: btnParent,
95+
outputDiv: outputDiv,
96+
stdin: false,
97+
args: false,
98+
transformOutput: wrapIntoMain,
99+
defaultOutput: "All tests passed",
100+
keepCode: true,
101+
outputHeight: "auto"
102+
});
103103
});
104104
});

0 commit comments

Comments
 (0)