Skip to content
Snippets Groups Projects
Commit 7ebb1262 authored by rhenck's avatar rhenck
Browse files

[editor] Make the TextEditor toolbar not scroll with long text

The material dialog functionality used, adding the mat-dialog-title 
directive the toolbar.
parent 7818109c
No related branches found
No related tags found
No related merge requests found
...@@ -4,12 +4,10 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog'; ...@@ -4,12 +4,10 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({ @Component({
selector: 'aspect-rich-text-edit-dialog', selector: 'aspect-rich-text-edit-dialog',
template: ` template: `
<mat-dialog-content> <aspect-rich-text-editor [(content)]="data.content"
<aspect-rich-text-editor [(content)]="data.content" [clozeMode]="data.clozeMode"
[clozeMode]="data.clozeMode" [defaultFontSize]="data.defaultFontSize">
[defaultFontSize]="data.defaultFontSize"> </aspect-rich-text-editor>
</aspect-rich-text-editor>
</mat-dialog-content>
<mat-dialog-actions> <mat-dialog-actions>
<button mat-button [mat-dialog-close]="data.content">{{'save' | translate }}</button> <button mat-button [mat-dialog-close]="data.content">{{'save' | translate }}</button>
<button mat-button mat-dialog-close>{{'cancel' | translate }}</button> <button mat-button mat-dialog-close>{{'cancel' | translate }}</button>
......
...@@ -42,8 +42,12 @@ button.active { ...@@ -42,8 +42,12 @@ button.active {
} }
.editor-control-panel { .editor-control-panel {
margin-bottom: 10px; margin-bottom: 20px;
background: linear-gradient(to top right, #FFF5F8, #FAFAFA); background: linear-gradient(to top right, #FFF5F8, #FAFAFA);
font: unset;
max-width: 1000px;
margin-left: auto;
margin-right: auto;
} }
.small-dropdown { .small-dropdown {
......
<div fxLayout="column" class="editor-control-panel"> <div fxLayout="column" class="editor-control-panel" mat-dialog-title>
<div fxLayout="row" fxLayoutAlign="space-between"> <div fxLayout="row" fxLayoutAlign="space-between">
<fieldset fxLayout="row"> <fieldset fxLayout="row">
<legend>Schriftauszeichnung</legend> <legend>Schriftauszeichnung</legend>
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</button> </button>
</div> </div>
</div> </div>
<tiptap-editor [editor]="editor" [ngModel]="content" <tiptap-editor [editor]="editor" [ngModel]="content" mat-dialog-content
[outputFormat]="clozeMode ? 'json' : 'html'" [outputFormat]="clozeMode ? 'json' : 'html'"
[style.font-size.px]="defaultFontSize" [style.font-size.px]="defaultFontSize"
(ngModelChange)="contentChange.emit($event)"> (ngModelChange)="contentChange.emit($event)">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment