1、在contenteditable="true" 中插入contenteditable="false"的元素,如果為其設置css user-select: none;后會導致刪除連續的 contenteditable="false" 元素被一次性刪除。
eg:編輯器中插入action刪除單個導致一串元素被刪除。
2、想讓 contenteditable 元素粘貼時自動過濾樣式可以為元素設置 css 屬性 -webkit-user-modify: read-write-plaintext-only方便,這樣確實方便,可是會導致元素在contenteditable="false" 狀態下也能編輯
3、在contenteditable="true" 中插入 contenteditable="false" 的元素后會導致光標不可見,可以在內容末尾插入一個 br 標簽。
eg:文章最后插入標題h2,contenteditable="false,光標不見。
