This commit is contained in:
2026-01-27 01:19:16 +01:00
parent f239694a4c
commit b66d0c5d49
2 changed files with 25 additions and 1 deletions

View File

@@ -1 +1 @@
1.1.13 1.1.14

View File

@@ -425,6 +425,30 @@
const setupBlurLogger = (editor) => { const setupBlurLogger = (editor) => {
if (!editor || !editor.Canvas || !editor.Canvas.getBody) return; if (!editor || !editor.Canvas || !editor.Canvas.getBody) return;
const logComponentInput = (model, label) => {
try {
const selectedEl = model && model.view && model.view.el;
const viewOuter = selectedEl ? String(selectedEl.outerHTML || '') : '';
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,
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),
});
} catch {}
};
if (!editor.__bridgeUiEditDebugBound) {
editor.__bridgeUiEditDebugBound = true;
editor.on('component:input', (model) => logComponentInput(model, 'INPUT'));
editor.on('component:update', (model) => logComponentInput(model, 'UPDATE'));
editor.on('component:deselected', (model) => logComponentInput(model, 'DESELECT'));
}
editor.on('canvas:frame:load', () => { editor.on('canvas:frame:load', () => {
const body = editor.Canvas && editor.Canvas.getBody && editor.Canvas.getBody(); const body = editor.Canvas && editor.Canvas.getBody && editor.Canvas.getBody();
if (!body || body.__bridgeBlurLoggerBound) return; if (!body || body.__bridgeBlurLoggerBound) return;