在保存到 CKEditor 插件之前立即更新编辑器内容
我正在为 CKEditor 开发一个插件,需要在保存之前立即对编辑器的内容进行一些更改。在 FCKeditor 中,我使用 OnAfterLinkedFieldUpdate
事件实现了这一点,但我还没有找到在 CKEditor 中执行此操作的等效方法。我本来希望有一个合适的活动可以参加,但似乎没有。有谁知道这样做的方法吗?
I am developing a plug-in for CKEditor that needs to make some changes to the editor's content immediately before saving. In FCKeditor, I achieved this using the OnAfterLinkedFieldUpdate
event but I haven't yet been able to find an equivalent way of doing this in CKEditor. I had hoped there would be a suitable event to hook into but there doesn't appear to be. Does anyone know of a way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 getData 事件,但要小心,因为它也会在内部使用时触发。
我已提交 http://dev.fckeditor.net/ticket/5254 来重新创建之前的事件
You could use the getData event, but be careful because it's fired also for internal uses.
I've filed http://dev.fckeditor.net/ticket/5254 to recreate the previous event
由于上面的链接实际上没有关于替代 OnAfterLinkedFieldUpdate 事件的解决方案,我写了一篇关于如何解决它的简短文章。
形式如下:
JavaScript:
代码为 此处
As the link above doesn't really have the solution on substitude OnAfterLinkedFieldUpdate event I have writen a short post on how to go around it.
Here is the form:
JavaScript:
The code is here