Browse Source

UI: Fixed mobile editor component in disabled state

pull/12139/head
Vladyslav_Prykhodko 2 years ago
parent
commit
c84cad4c78
  1. 1
      ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.html
  2. 6
      ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.ts

1
ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.html

@ -28,6 +28,7 @@
<button mat-raised-button <button mat-raised-button
color="primary" color="primary"
type="button" type="button"
*ngIf="!disabled"
(click)="apply()" (click)="apply()"
[disabled]="editorControl.invalid || !editorControl.dirty"> [disabled]="editorControl.invalid || !editorControl.dirty">
{{ 'action.apply' | translate }} {{ 'action.apply' | translate }}

6
ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.ts

@ -54,7 +54,8 @@ export class EditorPanelComponent implements OnInit {
height: 400, height: 400,
autofocus: false, autofocus: false,
branding: false, branding: false,
promotion: false promotion: false,
resize: false
}; };
constructor(private fb: FormBuilder) { constructor(private fb: FormBuilder) {
@ -64,6 +65,9 @@ export class EditorPanelComponent implements OnInit {
this.editorControl = this.fb.control(this.content); this.editorControl = this.fb.control(this.content);
if (this.disabled) { if (this.disabled) {
this.editorControl.disable({emitEvent: false}); this.editorControl.disable({emitEvent: false});
this.tinyMceOptions.toolbar = false;
this.tinyMceOptions.menubar = false;
this.tinyMceOptions.statusbar = false;
} }
} }

Loading…
Cancel
Save