Reputation: 1524
i try save using ajaxForm :
<script src="ckeditor.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript">
$('document').ready(function() {
$('#form').ajaxForm( {
target: '#preview',
success: function() {
}
});
});
</script>
<form method="post" name="form" id="form" action="save.php">
<textarea name="content" id="content" class="ckeditor editor" style="width:400px; height:100px;"></textarea>
<input type="submit" value="Submit" class="submit"/>
</form>
The problem is when im using ckeditor the textarea value cannot save into db, did i miss something ?
Upvotes: 0
Views: 1056
Reputation: 96
Where's ckeditor?
Init ckeditor like this
CKEDITOR.replace('content');
If you still can't submit data by ajaxForm, try to get data from ckeditor and submit by general ajax
var data = CKEDITOR.instances.content.getData();
$.post('url'
, { data : data }
, function(data) {
//do something
});
Upvotes: 1