当它连接到ckeditor时,如何使用jquery在Textarea中进行编辑 [英] How Can I Do Edit in Textarea with jquery when its connected to ckeditor

查看:60
本文介绍了当它连接到ckeditor时,如何使用jquery在Textarea中进行编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

i想要这样做但是我不能帮助我:

i有一个textarea哪个有效并做了真正的工作但是当我把它连接到ckeditor

不起作用。

textarea应该做的工作是:

它应该连接到带有id的jquery,然后执行计数器工作限制文本与我们联系100个字。

它的工作原理。

但是当我将文本区域连接到ckeditor时我的计数器不起作用。

代码是:

php:

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:


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);
        }
});



我的问题是:

id ='tck'

当class ='ckeditor'在textarea中时它不起作用

但是当class ='ckeditor'不在textarea时它的工作正常

i想要连接到ckeditor并执行此操作

请帮帮我!


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!

推荐答案

' #chare')。text(' 4000کاراکترمانده ');
('#chare').text('4000 کاراکتر مانده');


' #tck')。keyup(function(){
var a =
('#tck').keyup(function(){ var a=


' #tck')。val();
('#tck').val();


这篇关于当它连接到ckeditor时,如何使用jquery在Textarea中进行编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆