diff --git a/client/src/app/site/config/components/config-field/config-field.component.html b/client/src/app/site/config/components/config-field/config-field.component.html
index a3511d8cc..3ac323265 100644
--- a/client/src/app/site/config/components/config-field/config-field.component.html
+++ b/client/src/app/site/config/components/config-field/config-field.component.html
@@ -91,7 +91,7 @@
{{ configItem.label | translate }}
-
+
check_circle
diff --git a/client/src/app/site/config/components/config-field/config-field.component.ts b/client/src/app/site/config/components/config-field/config-field.component.ts
index ad6fd6b44..bbed3b4c6 100644
--- a/client/src/app/site/config/components/config-field/config-field.component.ts
+++ b/client/src/app/site/config/components/config-field/config-field.component.ts
@@ -145,6 +145,10 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
* Trigger an update of the data
*/
private onChange(value: any): void {
+ if (this.configItem.inputType === 'markupText') {
+ // tinyMCE markuptext does not autoupdate on change, only when entering or leaving
+ return;
+ }
if (this.configItem.inputType === 'datetimepicker') {
this.dateValue = new Date(value as number);
}
@@ -264,4 +268,28 @@ export class ConfigFieldComponent extends BaseComponent implements OnInit {
public hasDefault(): boolean {
return this.configItem.defaultValue !== undefined && this.configItem.defaultValue !== null;
}
+
+ /**
+ * Amends the application-wide tinyMCE settings with update triggers that
+ * send updated values only after leaving focus (Blur) or closing the editor (Remove)
+ *
+ * @returns an instance of tinyMCE settings with additional setup definitions
+ */
+ public getTinyMceSettings(): object {
+ return {
+ ...this.tinyMceSettings,
+ setup: editor => {
+ editor.on('Blur', ev => {
+ if (ev.target.getContent() !== this.translatedValue) {
+ this.update(ev.target.getContent());
+ }
+ });
+ editor.on('Remove', ev => {
+ if (ev.target.getContent() !== this.translatedValue) {
+ this.update(ev.target.getContent());
+ }
+ });
+ }
+ };
+ }
}