1 rng.modules.visualEditor = function(sandbox) {
\r
3 var view = $(sandbox.getTemplate('main')());
\r
6 var document2html = function(document) {
\r
10 var html2document = function() {
\r
11 return $('#rng-visualEditor-content').text();
\r
14 $('#rng-visualEditor-content', view).on('keyup', function() {
\r
20 sandbox.publish('ready');
\r
22 getView: function() {
\r
25 setDocument: function(document) {
\r
26 $('#rng-visualEditor-content', view).html(document2html(document));
\r
29 getDocument: function() {
\r
30 return html2document();
\r
32 isDirty: function() {
\r
35 setDirty: function(dirty) {
\r