Skip to content

Commit

Permalink
fix: collapsed editor init added
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBazukevich committed Feb 7, 2023
1 parent 8e808a7 commit 7f5b1a1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/plugins/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ export class UIPEditor extends UIPPlugin {
const attr = e.detail.attribute;
const value = e.detail.value;

if (attr === 'dark-theme') {
return this.updateEditorConfig({
theme: value === null
? AceTheme.Light
: AceTheme.Dark
});
switch (attr) {
case 'dark-theme':
return this.updateEditorConfig({theme: value === null ? AceTheme.Light : AceTheme.Dark});
case 'editor-collapsed':
value === null && this.initEditor();
return;
default:
return;
}
}
}

0 comments on commit 7f5b1a1

Please # to comment.