adasd
This commit is contained in:
@@ -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' },
|
||||
|
||||
Reference in New Issue
Block a user