Fix crash caused by editor mode

This commit is contained in:
Lone Iversen
2024-03-25 11:42:42 +01:00
committed by Jacob Overgaard
parent d29ce18ca3
commit 5ff086011a

View File

@@ -214,13 +214,13 @@ export class UmbInputTinyMceElement extends FormControlMixin(UmbLitElement) {
}
// set the configured inline mode
const mode = this.configuration?.getValueByAlias<string>('mode');
if (mode?.toLocaleLowerCase() === 'inline') {
const mode = this.configuration?.getValueByAlias<Array<string>>('mode');
if (mode?.[0].toLocaleLowerCase() === 'inline') {
configurationOptions.inline = true;
}
// set the maximum image size
const maxImageSize = this.configuration?.getValueByAlias<number>('maxImageSize');
const maxImageSize = this.configuration?.getValueByAlias<string>('maxImageSize');
if (maxImageSize !== undefined) {
configurationOptions.maxImageSize = maxImageSize;
}