Fix env.editor to point to the right object and add editor.env = env such that you can access env from the returned editor object
This commit is contained in:
parent
848e29912c
commit
7ed9cb2f57
1 changed files with 9 additions and 6 deletions
|
|
@ -75,13 +75,16 @@ require(deps, function() {
|
||||||
var env = require("pilot/environment").create();
|
var env = require("pilot/environment").create();
|
||||||
catalog.startupPlugins({ env: env }).then(function() {
|
catalog.startupPlugins({ env: env }).then(function() {
|
||||||
env.document = doc;
|
env.document = doc;
|
||||||
env.editor = env;
|
env.editor = editor;
|
||||||
editor.resize();
|
editor.resize();
|
||||||
Event.addListener(window, "resize", function() {
|
Event.addListener(window, "resize", function() {
|
||||||
editor.resize();
|
editor.resize();
|
||||||
});
|
});
|
||||||
el.env = env;
|
el.env = env;
|
||||||
});
|
});
|
||||||
|
// Store env on editor such that it can be accessed later on from
|
||||||
|
// the returned object.
|
||||||
|
editor.env = env;
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue