I have a button that enables Edit mode on/off and I broadcast it:
this.$rootScope.$broadcast('editModeChanged', this.editMode);
Also I have different inputs across my view that use the same settings/options, for example:
if (editModeEnabled) {
this.editorOptions.froalaEditor('edit.on');
} else {
this.editorOptions.froalaEditor('edit.off');
}
But I can manage only the last initialized instance. If I turn off edit mode, last one will behave as it should be, but other inputs will be fully editable which is wrong.
My task is to achieve all input initialization with specific settings/options (for different inputs they may be different) when "Enable edit mode" button is pressed and destroy all instances when this button is pressed again (edit mode turned off). Any ideas on how to achieve this ?
Thank you.
I ran into a problem where I need your help.
I have a button that enables Edit mode on/off and I broadcast it:
this.$rootScope.$broadcast('editModeChanged', this.editMode);
Also I have different inputs across my view that use the same settings/options, for example:So far I can achieve this by using:
But I can manage only the last initialized instance. If I turn off edit mode, last one will behave as it should be, but other inputs will be fully editable which is wrong.
My task is to achieve all input initialization with specific settings/options (for different inputs they may be different) when "Enable edit mode" button is pressed and destroy all instances when this button is pressed again (edit mode turned off). Any ideas on how to achieve this ? Thank you.