asdsad
This commit is contained in:
@@ -1 +1 @@
|
||||
1.1.74
|
||||
1.1.75
|
||||
@@ -181,10 +181,9 @@
|
||||
const isText = (component.is && component.is('text'))
|
||||
|| (component.get && component.get('type') === 'text');
|
||||
try {
|
||||
if (isText && component.components) {
|
||||
try {
|
||||
component.components(content);
|
||||
} catch {}
|
||||
const hasInlineStyle = /style\s*=\s*["'][^"']*["']/.test(content) || /<span\b/i.test(content);
|
||||
if (isText && component.components && !hasInlineStyle) {
|
||||
try { component.components(content); } catch {}
|
||||
}
|
||||
if (component.set) component.set('content', content);
|
||||
} catch {}
|
||||
@@ -876,10 +875,18 @@
|
||||
);
|
||||
addButton(icon('M4 7h10v2H4zM4 11h16v2H4zM4 15h10v2H4z'), 'Liste (ungeordnet)', 'insertUnorderedList');
|
||||
addButton(icon('M4 6h4v2H4V6zm0 4h4v2H4v-2zm0 4h4v2H4v-2zm6-8h10v2H10V6zm0 4h10v2H10v-2zm0 4h10v2H10v-2z'), 'Liste (geordnet)', 'insertOrderedList');
|
||||
addButton(icon('M4 7h10v2H4zM4 11h16v2H4zM4 15h12v2H4z'), 'Linksbundig', 'justifyLeft');
|
||||
addButton(icon('M5 7h14v2H5zM4 11h16v2H4zM5 15h14v2H5z'), 'Zentriert', 'justifyCenter');
|
||||
addButton(icon('M10 7h10v2H10zM4 11h16v2H4zM8 15h12v2H8z'), 'Rechtsbuendig', 'justifyRight');
|
||||
addButton(icon('M4 7h16v2H4zM4 11h16v2H4zM4 15h16v2H4z'), 'Blocksatz', 'justifyFull');
|
||||
addButton(icon('M4 7h10v2H4zM4 11h16v2H4zM4 15h12v2H4z'), 'Linksbundig', null, null, () => {
|
||||
applyComponentStyle({ textAlign: 'left' });
|
||||
});
|
||||
addButton(icon('M5 7h14v2H5zM4 11h16v2H4zM5 15h14v2H5z'), 'Zentriert', null, null, () => {
|
||||
applyComponentStyle({ textAlign: 'center' });
|
||||
});
|
||||
addButton(icon('M10 7h10v2H10zM4 11h16v2H4zM8 15h12v2H8z'), 'Rechtsbuendig', null, null, () => {
|
||||
applyComponentStyle({ textAlign: 'right' });
|
||||
});
|
||||
addButton(icon('M4 7h16v2H4zM4 11h16v2H4zM4 15h16v2H4z'), 'Blocksatz', null, null, () => {
|
||||
applyComponentStyle({ textAlign: 'justify' });
|
||||
});
|
||||
const linkModal = doc.createElement('div');
|
||||
linkModal.style.display = 'none';
|
||||
linkModal.style.position = 'absolute';
|
||||
|
||||
@@ -450,6 +450,9 @@
|
||||
} catch {}
|
||||
} catch {}
|
||||
};
|
||||
const hasInlineStyle = (html) => {
|
||||
return /<span\b|style\s*=/i.test(String(html || ''));
|
||||
};
|
||||
const ensureViewMatchesModel = (model) => {
|
||||
const target = resolveTextModel(model);
|
||||
if (!isTextLike(target)) return;
|
||||
@@ -462,7 +465,7 @@
|
||||
if (viewHtml) return;
|
||||
try {
|
||||
syncing.add(target);
|
||||
if (target.components) {
|
||||
if (target.components && !hasInlineStyle(modelHtml)) {
|
||||
try { target.components(modelHtml); } catch {}
|
||||
}
|
||||
if (target.set) target.set('content', modelHtml);
|
||||
@@ -501,7 +504,7 @@
|
||||
if (viewHtml === modelHtml) return;
|
||||
try {
|
||||
syncing.add(target);
|
||||
if (target.components) {
|
||||
if (target.components && !hasInlineStyle(viewHtml)) {
|
||||
try { target.components(viewHtml); } catch {}
|
||||
}
|
||||
if (target.set) target.set('content', viewHtml);
|
||||
@@ -536,7 +539,7 @@
|
||||
if (viewHtml === modelHtml && hasComps) return;
|
||||
try {
|
||||
syncing.add(target);
|
||||
if (target.components) {
|
||||
if (target.components && !hasInlineStyle(viewHtml)) {
|
||||
try { target.components(viewHtml); } catch {}
|
||||
}
|
||||
if (target.set) target.set('content', viewHtml);
|
||||
@@ -575,6 +578,9 @@
|
||||
const DEBUG_UI_SUMMARY = B && typeof B.DEBUG_UI_SUMMARY !== 'undefined'
|
||||
? !!B.DEBUG_UI_SUMMARY
|
||||
: true;
|
||||
const hasInlineStyle = (html) => {
|
||||
return /<span\b|style\s*=/i.test(String(html || ''));
|
||||
};
|
||||
const getModelHtmlForLog = (model) => {
|
||||
if (!model) return '';
|
||||
let html = '';
|
||||
@@ -722,7 +728,7 @@
|
||||
if (viewHtml === modelHtml) return;
|
||||
try {
|
||||
syncing.add(component);
|
||||
if (component.components) {
|
||||
if (component.components && !hasInlineStyle(viewHtml)) {
|
||||
try { component.components(viewHtml); } catch {}
|
||||
}
|
||||
if (component.set) component.set('content', viewHtml);
|
||||
@@ -790,7 +796,7 @@
|
||||
const viewHtml = normalizeViewHtml(selectedEl.innerHTML || '');
|
||||
if (!viewHtml) return;
|
||||
syncing.add(selected);
|
||||
if (selected.components) {
|
||||
if (selected.components && !hasInlineStyle(viewHtml)) {
|
||||
try { selected.components(viewHtml); } catch {}
|
||||
}
|
||||
if (selected.set) selected.set('content', viewHtml);
|
||||
|
||||
Reference in New Issue
Block a user