@ -6,6 +6,7 @@ require(['config/require-config'], function() {
{
noticeOnUnload: 0,
container : '#gjs',
height: '100%',
fromElement: true,
@ -22,6 +22,9 @@ define(function () {
// Enable/Disable undo manager
undoManager: true,
// Show an alert before unload the page
noticeOnUnload: true,
// Storage Manager
storage: {},
@ -45,6 +45,11 @@ define(function (require) {
if(!els)
throw new Error("'container' is required");
if(c.noticeOnUnload)
window.onbeforeunload = function(e) {
return 1;
};
c.el = document.querySelector(els);
var editor = new Editor(c).init();