Extract actions to separate files
This commit is contained in:
12
state/actions/updateEditorSettings.ts
Normal file
12
state/actions/updateEditorSettings.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import state, { IState } from '../index';
|
||||
|
||||
export const updateEditorSettings = (
|
||||
editorSettings: IState["editorSettings"]
|
||||
) => {
|
||||
state.editorCtx?.getModels().forEach((model) => {
|
||||
model.updateOptions({
|
||||
...editorSettings,
|
||||
});
|
||||
});
|
||||
return (state.editorSettings = editorSettings);
|
||||
};
|
||||
Reference in New Issue
Block a user