google-code-export / xheditor

Automatically exported from code.google.com/p/xheditor
GNU Lesser General Public License v3.0
1 stars 1 forks source link

如何绑定其他事件? #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
看了demo7,里边绑定了一个 change(); 事件,

我尝试后发现其他诸如bind,keyup,keydown之类的都无效的?

Original issue reported on code.google.com by scorpi...@gmail.com on 22 Apr 2010 at 7:49

GoogleCodeExporter commented 9 years ago
这个change实际上是编辑器额外触发的
默认情况下编辑器是另外一个iframe
你就把原先的textarea理解成a,xheditor编辑器理解成b
a是a,b是b,完全不相关的
你在a上绑定keyup,当然在b中不会有任何体现。

不过你可以尝试绑定在editor.doc对象上,这个对象是编辑器ifra
me区域的document

Original comment by yanis.w...@gmail.com on 22 Apr 2010 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by yanis.w...@gmail.com on 6 May 2010 at 11:58