From 059a6909b3fe2bee4770261548f970dded026070 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Thu, 29 Jan 2026 00:35:04 +0100 Subject: [PATCH] asdas --- config/current.ver | 2 +- public/editor/bridge-core.js | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/config/current.ver b/config/current.ver index c39e7b3..76700a7 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.52 \ No newline at end of file +1.1.53 \ No newline at end of file diff --git a/public/editor/bridge-core.js b/public/editor/bridge-core.js index 2e533c7..76d5a7f 100644 --- a/public/editor/bridge-core.js +++ b/public/editor/bridge-core.js @@ -572,6 +572,9 @@ const setupBlurLogger = (editor) => { if (!editor || !editor.Canvas || !editor.Canvas.getBody) return; const DEBUG_UI = !!(B && B.DEBUG_UI); + const DEBUG_UI_SUMMARY = B && typeof B.DEBUG_UI_SUMMARY !== 'undefined' + ? !!B.DEBUG_UI_SUMMARY + : true; const getModelHtmlForLog = (model) => { if (!model) return ''; let html = ''; @@ -601,7 +604,7 @@ }; const logComponentInput = (model, label) => { try { - if (!DEBUG_UI) return; + if (!DEBUG_UI && !(DEBUG_UI_SUMMARY && label === 'DESELECT')) return; const modelType = model && model.get ? model.get('type') : undefined; let selectedEl = model && model.view && model.view.el; if (!selectedEl && editor && editor.Canvas && editor.Canvas.getBody) { @@ -611,20 +614,23 @@ selectedEl = body.querySelector(`#${id}`); } } - const viewOuter = selectedEl ? String(selectedEl.outerHTML || '') : ''; const modelContent = String(getModelHtmlForLog(model) || ''); - const editorHtml = editor && typeof editor.getHtml === 'function' ? String(editor.getHtml() || '') : ''; - console.warn(`[UI EDIT ${label}]`, { - modelType, - modelId: model && (model.getId ? model.getId() : model.get && model.get('id')), - modelContentLen: modelContent.length, - modelContent: modelContent.slice(0, 1000), - viewOuterLen: viewOuter.length, - viewOuter: viewOuter.slice(0, 1000), - editorHtmlLen: editorHtml.length, - editorHtml: editorHtml.slice(0, 1000), - }); + if (DEBUG_UI) { + const viewOuter = selectedEl ? String(selectedEl.outerHTML || '') : ''; + const editorHtml = editor && typeof editor.getHtml === 'function' ? String(editor.getHtml() || '') : ''; + console.warn(`[UI EDIT ${label}]`, { + modelType, + modelId: model && (model.getId ? model.getId() : model.get && model.get('id')), + modelContentLen: modelContent.length, + modelContent: modelContent.slice(0, 1000), + viewOuterLen: viewOuter.length, + viewOuter: viewOuter.slice(0, 1000), + editorHtmlLen: editorHtml.length, + editorHtml: editorHtml.slice(0, 1000), + }); + } if (label === 'DESELECT' && model && model.get && model.get('type') === 'text') { + if (!DEBUG_UI && !DEBUG_UI_SUMMARY) return; let viewHtml = selectedEl ? String(selectedEl.innerHTML || '') : ''; let visibleText = selectedEl ? String(selectedEl.textContent || '') : ''; if (!viewHtml && selectedEl && modelContent) {