add preview for markup
This commit is contained in:
@@ -1,15 +1,36 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user