hello,
i want to do this but i cant please help me:
i have one textarea wich works and do the true job but when i connect it to ckeditor
doesnt work.
the job that textarea should do is:
it should connect to jquery with an id and after that do the counter job and limit the text in contact us for 100 word.
it works.
but when i connect the text area to the ckeditor my counter not work.
the code is :
php :
echo"<div id='ckhide'>";
echo"<form method='post'action='index.php'>";
echo"<div id='indexck'><textarea id='tck'class='ckeditor'name='editor1'></textarea></div>";
echo"<input type='text'class='sbjarea'value='موضوع پست حداکثر سی کلمه'name='sbj'maxlength='30'/>";
echo"<input type='submit'id='cksend1'value='ارسال پست'name='cksend1'/>";
echo"<div id='chare'></div>";
echo"</form>";
echo"</div>";
jquery :
$('#chare').text('4000 کاراکتر مانده');
$('#tck').keyup(function(){
var a=$('#tck').val();
$('#tck').html(a);
var max = 4000;
var len = $(this).val().length;
if (len > max) {
$('#chare').text('متن شما بیش از حد مجاز است .');
$('#cksend1').hide(0);
}
else if (len ==0) {
$('#cksend1').hide(0);
$('#chare').text('50 کاراکتر مانده');
}
else {
var ch = max - len;
$('#chare').text(ch + ' کاراکتر مانده');
$('#cksend1').fadeIn(0);
}
});
my problem is with :
id='tck'
when the class='ckeditor' is in the textarea its not work
but when the class='ckeditor' isnt in the textarea its work true
i want to connect to ckeditor and do this
please help me!