mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-01-22 23:40:07 +00:00
22 lines
442 B
JavaScript
22 lines
442 B
JavaScript
CKEDITOR.plugins.add('savedocs', {
|
|
init: function(a) {
|
|
var cmd = a.addCommand('savedoc', {
|
|
exec: saveDocument
|
|
})
|
|
a.ui.addButton('savedocs', {
|
|
label: 'Save',
|
|
command: 'savedoc',
|
|
icon: this.path + "images/save.png"
|
|
})
|
|
}
|
|
});
|
|
|
|
function saveDocument(event) {
|
|
var theForm = event.element.$.form;
|
|
if (typeof(theForm.onsubmit) == 'function') {
|
|
AveDocs.saveDocument();
|
|
return false;
|
|
} else {
|
|
AveDocs.saveDocument();
|
|
}
|
|
} |