tinymce.get('content').getContent
is not working.
Here is my code. you can see all the different comments for different things I have tried. I have
alert('end');
at the end just as a test to see if the code is working. Currently it is not unless i comment out anything related to tinymce that is not the initializer. These functions are inside of document ready.
Why wont tinymce getcontent work?
<script>
$(document).ready(function () {
tinymce.init({
selector: '#mytextarea',
inline: true
});
//$('input').keyup(function () {
// //alert("keyed");
// $('[name="' + $(this).attr('name') + '"]').val($(this).val());
//});
//$('.artBodyText').keyup(function () {
// alert("keyed");
// $('[name="' + $(this).attr('name') + '"]').val($(this).val());
//});
//$('#mytextarea').keyup(function () {
// alert("keyed");
// $('[name="' + $(this).attr('name') + '"]').val($(this).val());
//});
// var x = tinymce.get('#mytextarea').getContent();
//var y = $('mytextarea').tinymce().getContent();
alert(tinymce.get('mytextarea').getContent());
alert("end");
});
</script>
Is it someting to do with firefox or the way I am loading the editor? Note - the editor works on my form very nicely for submitting and posting data.