asdasd
This commit is contained in:
@@ -202,9 +202,9 @@
|
|||||||
content.style.fontFamily = 'Arial, sans-serif';
|
content.style.fontFamily = 'Arial, sans-serif';
|
||||||
content.style.fontSize = '14px';
|
content.style.fontSize = '14px';
|
||||||
|
|
||||||
const initialHtml = (component.get && component.get('content'))
|
const modelContent = (component.get && component.get('content')) || '';
|
||||||
|| (component.view && component.view.el && component.view.el.innerHTML)
|
const viewHtml = (component.view && component.view.el && component.view.el.innerHTML) || '';
|
||||||
|| '';
|
const initialHtml = sanitizeInlineHtml(viewHtml || modelContent, modelContent || '');
|
||||||
content.innerHTML = initialHtml;
|
content.innerHTML = initialHtml;
|
||||||
const existingStyle = component && component.get && component.get('style') ? component.get('style') : null;
|
const existingStyle = component && component.get && component.get('style') ? component.get('style') : null;
|
||||||
if (existingStyle && typeof existingStyle === 'object') {
|
if (existingStyle && typeof existingStyle === 'object') {
|
||||||
@@ -388,9 +388,14 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (component && component.set) {
|
if (component && component.setStyle && component.getStyle) {
|
||||||
const current = component.get && component.get('style') ? { ...component.get('style') } : {};
|
const current = component.getStyle() || {};
|
||||||
component.set('style', { ...current, ...styleObj });
|
const safeCurrent = (current && typeof current === 'object' && !Array.isArray(current)) ? current : {};
|
||||||
|
component.setStyle({ ...safeCurrent, ...styleObj });
|
||||||
|
} else if (component && component.set) {
|
||||||
|
const current = component.get && component.get('style') ? component.get('style') : {};
|
||||||
|
const safeCurrent = (current && typeof current === 'object' && !Array.isArray(current)) ? current : {};
|
||||||
|
component.set('style', { ...safeCurrent, ...styleObj });
|
||||||
}
|
}
|
||||||
if (component && component.view && component.view.el) {
|
if (component && component.view && component.view.el) {
|
||||||
Object.entries(styleObj).forEach(([key, val]) => {
|
Object.entries(styleObj).forEach(([key, val]) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user