adasdccc
This commit is contained in:
@@ -890,6 +890,10 @@
|
||||
if (!model || this.restoring.has(model)) return;
|
||||
const last = this.lastContent.get(model);
|
||||
if (!last || !model.get) return;
|
||||
const viewEl = model.view && model.view.el;
|
||||
if (viewEl && (viewEl.isContentEditable || viewEl.getAttribute('contenteditable') === 'true')) return;
|
||||
const viewHtml = String(viewEl && viewEl.innerHTML || '').trim();
|
||||
if (viewHtml) return;
|
||||
const current = String(model.get('content') || '').trim();
|
||||
if (!current || current === '<div></div>' || current === '<div><br></div>' || current === '<div><br></div><br>') {
|
||||
this.restoring.add(model);
|
||||
|
||||
@@ -415,6 +415,8 @@
|
||||
if (el.isContentEditable || el.getAttribute('contenteditable') === 'true') return;
|
||||
const modelHtml = String(target.get ? target.get('content') || '' : '').trim();
|
||||
if (!modelHtml) return;
|
||||
const viewHtml = String(el.innerHTML || '').trim();
|
||||
if (viewHtml) return;
|
||||
const apply = () => {
|
||||
try {
|
||||
const current = String(el.innerHTML || '').trim();
|
||||
|
||||
Reference in New Issue
Block a user