39 lines
1.0 KiB
HTML
39 lines
1.0 KiB
HTML
<style>
|
|
|
|
markdown {
|
|
--mdc-dialog-supporting-text-color: black;
|
|
}
|
|
.mat-mdc-dialog-content {
|
|
display: flex;
|
|
justify-content: center;
|
|
height: 22em;
|
|
}
|
|
.mat-mdc-dialog-content > div {
|
|
width:50%;
|
|
}
|
|
.preview {
|
|
margin-left: 0.5em;
|
|
overflow: auto;
|
|
}
|
|
mat-form-field textarea {
|
|
height: 20em;
|
|
}
|
|
</style>
|
|
<h1 mat-dialog-title>Add Text</h1>
|
|
<div mat-dialog-content>
|
|
<div>
|
|
<mat-form-field class="pdb-form-full-width">
|
|
<mat-label>Text</mat-label>
|
|
<textarea matInput [(ngModel)]="text" #textElement focus ></textarea>
|
|
</mat-form-field>
|
|
<div>Text field supports <a href="https://spec.commonmark.org/" class="external-link" target="_blank" rel="noopener">Markdown</a>.</div>
|
|
</div>
|
|
<div class="preview">
|
|
<markdown [data]="this.text"></markdown>
|
|
</div>
|
|
</div>
|
|
<div mat-dialog-actions align="end">
|
|
<button mat-button mat-dialog-close (click)="close()">Cancel</button>
|
|
<button class="save-button" mat-flat-button mat-dialog-close (click)="onSaveClick()">Save</button>
|
|
</div>
|