2017-06-24 00:58:56 +03:00

22 lines
401 B
JavaScript

CKEDITOR.plugins.add('savedocs', {
init: function(a) {
var cmd = a.addCommand('savedoc', {
exec: saveAjax
})
a.ui.addButton('savedocs', {
label: 'Save',
command: 'savedoc',
icon: this.path + "images/save.png"
})
}
})
function saveAjax(e) {
var theForm = e.element.$.form;
if (typeof(theForm.onsubmit) == 'function') {
SaveAjax();
return false;
} else {
SaveAjax();
}
}