答案 0 :(得分:3)
我得到了解决方案,请使用此
CKEDITOR.plugins.registered['save'] = {
init: function (editor) {
var command = editor.addCommand('save',
{
modes: { wysiwyg: 1, source: 1 },
exec: function (editor) { // Add here custom function for the save button
alert('You clicked the save button in CKEditor toolbar!');
}
});
editor.ui.addButton('Save', { label: 'Save', command: 'save' });
}
}
答案 1 :(得分:1)
.formSubmit是表单的类名,
var data = CKEDITOR.instances.editor1.getData();这是textarea的数据
$('.formSubmit').submit( function(){
var data = CKEDITOR.instances.editor1.getData();
$.ajax({
type: 'POST',
url: 'ck_bienban_1_luu.php',// url of phpcode save
data: {
data: data,
},
success: function() {
},
});
return(false);
}
);