From 3182d8f5a1642eeac079576083eea86f09c5751a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 10 Dec 2013 22:44:40 +0100 Subject: [PATCH 1/1] integration wip: editor_init_callback Hosting page is now responsible for setting bootstrapped data and starting the editor. --- src/editor/entrypoint.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); + } }); }); -- 2.20.1