This commit is contained in:
2026-01-17 03:02:51 +01:00
parent 03aa0756c9
commit 87c297823f

View File

@@ -318,7 +318,24 @@
{ label: 'Trebuchet MS', value: 'Trebuchet MS, sans-serif' },
{ label: 'Verdana', value: 'Verdana, sans-serif' },
];
addSelect([{ label: 'Schriftart', value: '' }, ...fontOptions], 'Schriftart', (value) => applyInlineStyle('fontFamily', value));
const applyComponentStyle = (styleObj) => {
try {
if (component && component.set) {
const current = component.get && component.get('style') ? { ...component.get('style') } : {};
component.set('style', { ...current, ...styleObj });
}
if (component && component.view && component.view.el) {
Object.entries(styleObj).forEach(([key, val]) => {
component.view.el.style[key] = val;
});
}
} catch {}
};
addSelect([{ label: 'Schriftart', value: '' }, ...fontOptions], 'Schriftart', (value) => {
if (!value) return;
applyComponentStyle({ fontFamily: value });
});
addSelect([
{ label: 'Groesse', value: '' },
{ label: '10px', value: '10' },