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