Vote count:
0
I am using tiny mce as editor in php. But it is not working.
<script src="http://ift.tt/1pTKLEQ"></script>
<script type="application/javascript">
$(document).ready(function(){
tinymce.init({selector:'#album_description_input'});
$('#create_picture_album_form').ajaxForm({
beforeSubmit : function(){
/*$('#album_description_input').html("Hello");*/
$('#album_description_input').html(tinymce.get('album_description_input').getContent());
},
});
});
</script>
HTML:
<textarea name="album_description_input" id="album_description_input"></textarea>
I am sure that the value of the textarea is not changing before submitting the form. I have tested the page by developer tool. Whenever i am adding $("#album_description_input").html("Hello") the submission of form is successful and data is pushed in the database. But if i add the line in js file commenting the next line it doesn't work. Why is that?
NOTE : I am using action="upload.php" .so no need of tinyMCE.triggerSave();
asked 42 secs ago
Aucun commentaire:
Enregistrer un commentaire