From: Aleksander Ɓukasz Date: Tue, 10 Dec 2013 21:44:40 +0000 (+0100) Subject: integration wip: editor_init_callback X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/3182d8f5a1642eeac079576083eea86f09c5751a?ds=sidebyside integration wip: editor_init_callback Hosting page is now responsible for setting bootstrapped data and starting the editor. --- diff --git a/src/editor/entrypoint.js b/src/editor/entrypoint.js index ac19d6e..528952b 100644 --- a/src/editor/entrypoint.js +++ b/src/editor/entrypoint.js @@ -1,7 +1,7 @@ (function() { 'use strict'; - /* globals requirejs, RNG_BOOTSTRAP_DATA */ + /* globals requirejs, editor_init */ requirejs.config({ baseUrl: '/static/editor/src/editor', @@ -53,9 +53,11 @@ ], function($, runner, rng, modules, corePlugin) { $(function() { var app = new runner.Runner(rng, modules); - app.setBootstrappedData('data', RNG_BOOTSTRAP_DATA); app.registerPlugin(corePlugin); - app.start({rootSelector:'#editor_root'}); + + if(typeof editor_init !== 'undefined') { + editor_init(app); + } }); });