Código HTML:
<script src="../ROA/ckeditor-4.0_moono156_full_ENG/ckeditor/ckeditor.js"></script>
<link href="../ROA/ckeditor-4.0_moono156_full_ENG/ckeditor/samples/sample.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="http://www.simonbattersby.com/javascript/jquery.autosave.js"></script>
<script type="text/javascript">
$(function() {
getDatabase();
$("#postCommand\\.detail").autosave({
url: "autosave.php?p=2",
method: "post",
grouped: true,
success: function(data) {
$("#message").html("Data updated successfully").show();
setTimeout('fadeMessage()',1500);
getDatabase();
},
send: function(){
$("#message").html("Sending data....");
},
dataType: "html"
});
});
function getDatabase(){
$.get('autosave.php?p=2', function(data) {
$('#database').html(data);
});
}
function fadeMessage(){
$('#message').fadeOut('slow');
}
</script>
<script>
var editor;
function changeEnter() {
// If we already have an editor, let's destroy it first.
if ( editor )
editor.destroy( true );
// Create the editor again, with the appropriate settings.
editor = CKEDITOR.replace( 'postCommand.detail', {
extraPlugins: 'enterkey',
});
}
window.onload = changeEnter;
</script>
<form method="post">
<textarea id="postCommand.detail" name="detail" class="post-editor" cols="78" rows="13" ></textarea>
<input type="submit" value="Save changes" />
</form>
<p id="message"></p>
Con ese código hago un autosave.
Antes de aplicar el ckeditor funciona:
Pero después no lo guarda:
Alguien podría ayudarme?