用tinyMCE获取内容? [英] getting contents with tinyMCE?

查看:909
本文介绍了用tinyMCE获取内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个tinyMCE textarea #frmbody并且正在使用它的jquery实例。

I have a tinyMCE textarea #frmbody and am using the jquery instance of it.

<textarea class="tinymce" name="frmbody" id="frmbody" cols="30" rows="20"></textarea>

我正在尝试获取用户输入的textarea的内容。

I'm trying to get the contents of the textarea as the user types.

$("#frmbody").live('keyup', function(e) {
    alert("keyup");
});

上面的代码无效,我不知道为什么。如果我删除tinyMCE实例,上面的代码工作正常。有任何想法吗?

The code above is not working and I'm not sure why. If I remove the tinyMCE instance, the code above works fine. Any ideas?

推荐答案

这是因为TinyMCE的实例不是真正的textarea,因此未检测到keyup事件。请尝试 onchange回调

That's because an instance of TinyMCE isn't a true textarea, so keyup events aren't detected. Try the onchange callback instead.

这篇关于用tinyMCE获取内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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