Skip to content

Commit

Permalink
fix(HTML Authoring): Render previously-saved images in TinyMCE (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima authored Dec 5, 2022
1 parent 7349067 commit 59a0c0f
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@ export class HtmlAuthoring extends ComponentAuthoring {
html: string = '';

constructor(
protected ConfigService: ConfigService,
protected NodeService: NodeService,
protected ProjectAssetService: ProjectAssetService,
protected ProjectService: TeacherProjectService,
protected UtilService: UtilService
protected configService: ConfigService,
protected nodeService: NodeService,
protected projectAssetService: ProjectAssetService,
protected projectService: TeacherProjectService,
protected utilService: UtilService
) {
super(ConfigService, NodeService, ProjectAssetService, ProjectService);
super(configService, nodeService, projectAssetService, projectService);
}

ngOnInit() {
super.ngOnInit();
this.html = this.UtilService.replaceWISELinks(this.componentContent.html);
this.html = this.projectService.replaceAssetPaths(
this.utilService.replaceWISELinks(this.componentContent.html)
);
}

htmlChanged(): void {
this.componentContent.html = this.UtilService.insertWISELinks(
this.ConfigService.removeAbsoluteAssetPaths(this.html)
this.componentContent.html = this.utilService.insertWISELinks(
this.configService.removeAbsoluteAssetPaths(this.html)
);
this.componentChanged();
}
Expand Down

0 comments on commit 59a0c0f

Please sign in to comment.