【问题标题】:An alternative to 'selectionChange' event?“selectionChange”事件的替代方案?
【发布时间】:2016-12-06 21:07:46
【问题描述】:

我想在用户删除一些文本后执行一个函数。

我希望为此目的监听 'selectionChange' 事件,但文档指出它不会针对每种情况触发,而且我注意到它实际上也只需单击可编辑区域即可触发。我的插件是否还有其他事件可以监听?

【问题讨论】:

    标签: ckeditor selection selectionchanged


    【解决方案1】:

    这对我有用。

    CKEDITOR.instances.editor1.document.$.addEventListener('selectionchange', function (e) { //selection change logic goes here });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-05
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多