You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sandkasten-web/src/app/components/editor/editor.component.html

55 lines
1.2 KiB

<div>
<div>
<ngx-codemirror
[options]="{
theme: 'material',
lineNumbers: true,
lineWrapping: true,
mode: mode,
autofocus: true
}"
[(ngModel)]="editorContent"
[autoFocus]="true"
>
</ngx-codemirror>
</div>
<div>
<ngx-codemirror
[options]="{
theme: 'material',
lineNumbers: false,
lineWrapping: false,
mode: mode,
autofocus: true,
readOnly: true
}"
[(ngModel)]="resultContent"
>
</ngx-codemirror>
</div>
<div>
<label for="language">Langage de programmation</label>
<select
id="language"
name="language"
[(ngModel)]="mode"
(ngModelChange)="changeMode()"
>
<option value="text/typescript">TypeScript</option>
<option value="markdown">Markdown</option>
</select>
</div>
<div>
<button type="button" (click)="clear()">Remettre à zéro</button>
</div>
<button (click)="onRunButtonClicked()" [disabled]="isLoaded">Lancer</button>
<div *ngIf="!isLoaded">
<p>Chargement: {{ loadingProgress }}%</p>
<div class="loading-bar" [style.width.%]="loadingProgress"></div>
</div>
</div>