用ckeditor检测更改 [英] detecting changes with ckeditor

查看:158
本文介绍了用ckeditor检测更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个解决方案,但没有任何工作的解决方案。我想检测textarea是否已更改。我使用ckeditor,所以你不能检查textarea本身。我在文档中找到了一些东西,但是我不能让它为我工作。

I've been googling around to find a solution but without any working solutions yet. I want to detect if the textarea has been changed. I'm using ckeditor so you can't check the textarea itself. I found something in the documentation but I couldn't get it to work for me.

以前有人试过这样做吗?

Did someone ever tried to do this before and is it possible?

推荐答案

经过一番研究和大量的搜索,发现了一个合适的方法。

After some research and a lot of googling a found a suitable method.

var content_editor = CKEDITOR.instances['content'];

content_editor.on( 'key', function() {
    change_page = true;
});

这篇关于用ckeditor检测更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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