Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 jwysiwyg 中按回车键添加新段落时,新段落会自动分配前一个段落的属性。
有没有办法禁止将某些属性克隆到新插入的元素中?我查看了 jwysiwyg 的来源,但没有找到克隆元素的位置。
我最终改用 CKeditor。它肯定更大,可能比我需要的更多,但它也提供了我们在这个项目中需要的一些其他东西。
但是,我在 CKeditor 中遇到了同样的问题。除了id被克隆的所有属性,包括我的自定义属性。
id
在 CK 中,我可以通过node.removeAttribute( 'myattrib', false );在第 117 行添加/ckeditor/_source/core/dom/node.js
node.removeAttribute( 'myattrib', false );
/ckeditor/_source/core/dom/node.js