
tinymce 监听附件变动失灵的解决办法
在使用附件插入插件时,您遇到了无法监听附件插入和删除变动的难题。以下是如何解决此问题的方法:
解决方案:
editor.on("nodechange", (e) => {
console.log("node change:", e.element.outerhtml);
});watch: {
editorvalue(val) {
if (this.editorcursorpositon) {
this.editor.selection.setcursorlocation(this.editorcursorpositon);
}
console.log("value:", val);
},
},methods: {
afterattachupload(attachment) {
this.editor.selection.select(
this.editor.dom.getparent(attachment, "figure")
);
this.$emit("attachments", this.editorvalue);
},
},// before insert attachment this.afterAttachUpload(attachment);
以上就是Tinymce 附件插入监听失效怎么办?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号