Skip to content

Commit

Permalink
fix(slots): fix slot reloading
Browse files Browse the repository at this point in the history
fixes #327
  • Loading branch information
roedoejet committed Jul 23, 2024
1 parent 7422e31 commit 8a1bc02
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/studio-web/src/app/editor/editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ export class EditorComponent implements OnDestroy, OnInit, AfterViewInit {
);

if (titleSlot) {
if (this.editorService.slots.title) {
titleSlot.innerText = this.editorService.slots.title;
}
// this.editorService.slots.title = titleSlot.innerText;
this.editorService.slots.title = titleSlot.innerText;
titleSlot.setAttribute("contenteditable", true);
// Because we're just loading this from the single-file HTML, it's cumbersome to
// use Angular event input event listeners like we do in the demo
Expand All @@ -223,9 +220,7 @@ export class EditorComponent implements OnDestroy, OnInit, AfterViewInit {
);
}
if (subtitleSlot) {
if (this.editorService.slots.subtitle) {
subtitleSlot.innerText = this.editorService.slots.subtitle;
}
this.editorService.slots.subtitle = subtitleSlot.innerText;
subtitleSlot.setAttribute("contenteditable", true);
subtitleSlot.addEventListener(
"input",
Expand Down

0 comments on commit 8a1bc02

Please sign in to comment.