X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/1aba836313d1513bbe0ca947e01176806c900233..b193de5bbfb1c96da0bb9a5398eb2a11b094017a:/modules/rng.js?ds=sidebyside diff --git a/modules/rng.js b/modules/rng.js index 4e0ca6e..0a39ed8 100644 --- a/modules/rng.js +++ b/modules/rng.js @@ -41,20 +41,25 @@ rng.modules.rng = function(sandbox) { editor.setDirty(false); } } + }, + showed: function(slug) { + if(slug === 'visual') + sandbox.getModule('visualEditor').onShowed(); } }; eventHandlers.sourceEditor = { ready: function() { - addTab('Source', 'source', sandbox.getModule('sourceEditor').getView()); + addTab(gettext('Source'), 'source', sandbox.getModule('sourceEditor').getView()); sandbox.getModule('sourceEditor').setDocument(sandbox.getModule('data').getDocument()); } }; eventHandlers.visualEditor = { ready: function() { - addTab('Visual', 'visual', sandbox.getModule('visualEditor').getView()); sandbox.getModule('visualEditor').setDocument(sandbox.getModule('data').getDocument()); + addTab(gettext('Visual'), 'visual', sandbox.getModule('visualEditor').getView()); + } };