This commit is contained in:
2026-01-27 01:56:20 +01:00
parent 02057ad698
commit acfdaf0cc0
2 changed files with 4 additions and 3 deletions

View File

@@ -438,7 +438,8 @@
try {
// Force-sync direct edits from view -> model before logging.
const viewEl = model && model.view && model.view.el ? model.view.el : null;
if (model && model.get && viewEl && !model.__bridgeUiSyncing) {
const modelType = model && model.get ? model.get('type') : undefined;
if (modelType === 'text' && model && model.get && viewEl && !model.__bridgeUiSyncing) {
const viewHtml = String(viewEl.innerHTML || '').trim();
const modelHtml = String(model.get('content') || '').trim();
if (viewHtml && viewHtml !== modelHtml) {
@@ -452,7 +453,7 @@
const modelContent = model && model.get ? String(model.get('content') || '') : '';
const editorHtml = editor && typeof editor.getHtml === 'function' ? String(editor.getHtml() || '') : '';
console.warn(`[UI EDIT ${label}]`, {
modelType: model && model.get ? model.get('type') : undefined,
modelType,
modelId: model && (model.getId ? model.getId() : model.get && model.get('id')),
modelContentLen: modelContent.length,
modelContent: modelContent.slice(0, 1000),