if (ajaxpost.status != 200)
alert('Foutcode '+ajaxpost.status+' bij opslaan: '+ajaxpost.responseText);
else
- alert('Pagina is goed opgeslagen');
+ editor.resetDirty();
};
ajaxpost.send(data);
},
config.forcePasteAsPlainText = true;
config.contentsCss = document.styleSheets[0].href;
config.toolbar = [
- ['Inlinesave', '-', 'ShowBlocks', 'Sourcedialog', '-', 'Undo', 'Redo'],
- ['Format'],
- ['BulletedList', 'NumberedList', '-', 'Blockquote'],
- ['Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', '-', 'Anchor', 'Link'],
- ['HorizontalRule', 'Table', 'Image', 'CreatePlaceholder'],
+ ['Inlinesave', '-', 'Undo', 'Redo'],
+ ['Format', 'BulletedList', 'NumberedList', 'Blockquote'],
+ ['Bold', 'Italic', 'Link'],
+ ['HorizontalRule', 'Table', 'Image'],
+ ['CreatePlaceholder', 'Sourcedialog'],
];
config.toolbarCanCollapse = true;
config.floatSpacePreferRight = true;
config.disableObjectResizing = true;
document.execCommand('enableObjectResizing', false, false); // workaround in inline mode; ff bug?
});
+
+ window.onbeforeunload = function () {
+ if (editor.checkDirty()) {
+ return 'Pagina verlaten zonder wijzigingen op te slaan?'; // message ignored in modern browsers
+ }
+ };
});
CKEDITOR.disableAutoInline = true;