X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ce51fb7e5de8910382af08e299831714e5f0e4e4..cf7d465ce6ed2acbc2b1c028e46847ead5320e9c:/modules/rng.js?ds=sidebyside diff --git a/modules/rng.js b/modules/rng.js index 4e0ca6e..6ea6f40 100644 --- a/modules/rng.js +++ b/modules/rng.js @@ -41,6 +41,10 @@ rng.modules.rng = function(sandbox) { editor.setDirty(false); } } + }, + showed: function(slug) { + if(slug === 'visual') + sandbox.getModule('visualEditor').onShowed(); } }; @@ -53,8 +57,9 @@ rng.modules.rng = function(sandbox) { eventHandlers.visualEditor = { ready: function() { - addTab('Visual', 'visual', sandbox.getModule('visualEditor').getView()); sandbox.getModule('visualEditor').setDocument(sandbox.getModule('data').getDocument()); + addTab('Visual', 'visual', sandbox.getModule('visualEditor').getView()); + } };