refactor(submit): drop the hover block-delete overlay
Hovering a quote, hidden block, code block or table showed a ✕ button in the block's top-right corner. It read as a stray close button and is not wanted. Removed - installBlockActions() and the two-step select/delete flow it drove - the block-actions markup, positioning, selected-state CSS in the iframe content style - BLOCK_SELECTOR, which only the overlay used Deleting blocks still works: removeAdjacentBlock() keeps Backspace / Delete next to a structural block (table, pre, hr, quote, hidden block) working, and that is covered by both code and tests.
This commit is contained in:
1 parent
49f1212e33
commit
a061ec86ce
6 files changed
+25
-288
No files matched your search
@@ -48,9 +48,8 @@
|
||||
/**
|
||||
* 正文自身的副本:剔除 TinyMCE 的辅助节点。
|
||||
*
|
||||
* 编辑器会把块级删除浮层(#jio-block-actions)之类带文字的工具节点插进
|
||||
* body,它们都带 data-mce-bogus。直接读 body.textContent 会把「选中此块」
|
||||
* 当成正文,导致空正文永远判成非空、占位符不显示。
|
||||
* 编辑器会把带文字的工具节点插进 body,它们都带 data-mce-bogus。直接读
|
||||
* body.textContent 会把工具文案当成正文,导致空正文永远判成非空、占位符不显示。
|
||||
*/
|
||||
function contentClone(body) {
|
||||
var clone = body.cloneNode(true);
|
||||
|
||||
Reference in new issue
Block a user