diff --git a/projects/editor/src/app/text-editor/rich-text-editor.component.html b/projects/editor/src/app/text-editor/rich-text-editor.component.html index 4991d39c035fae146d57bc84d5e6e36f35ab6d5a..e746d813bf5615a39fc44e3cd55d72bcd019ddfe 100644 --- a/projects/editor/src/app/text-editor/rich-text-editor.component.html +++ b/projects/editor/src/app/text-editor/rich-text-editor.component.html @@ -252,7 +252,7 @@ <button mat-button (click)="insertSpecialChar('♦')">♦</button> </mat-menu> <button mat-icon-button matTooltip="Bild" [matTooltipShowDelay]="300" - (click)="addImage()"> + (click)="insertImage()"> <mat-icon>image</mat-icon> </button> <button mat-icon-button matTooltip="Zitat" [matTooltipShowDelay]="300" diff --git a/projects/editor/src/app/text-editor/rich-text-editor.component.ts b/projects/editor/src/app/text-editor/rich-text-editor.component.ts index 1865ffab64bea36b93c8a61dfe1bbca15827893c..26eda925dee280bd9efc0b9a07b7f9fabc724142 100644 --- a/projects/editor/src/app/text-editor/rich-text-editor.component.ts +++ b/projects/editor/src/app/text-editor/rich-text-editor.component.ts @@ -74,6 +74,7 @@ export class RichTextEditorComponent implements OnInit, AfterViewInit { HangingIndent, Image.configure({ inline: true, + allowBase64: true, HTMLAttributes: { style: 'display: inline-block; height: 1em; vertical-align: middle' } @@ -210,7 +211,7 @@ export class RichTextEditorComponent implements OnInit, AfterViewInit { this.editor.commands.unhangIndent(this.selectedIndentSize); } - async addImage(): Promise<void> { + async insertImage(): Promise<void> { const mediaSrc = await FileService.loadImage(); this.editor.commands.setImage({ src: mediaSrc }); }