<!-- Render (no edit). -->
<ion-item *ngIf="!edit && field && field.name">
    <ion-label>
        <h2>{{ field.name }}</h2>
        <p><core-format-text [text]="value" [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId"
            [courseId]="courseId">
        </core-format-text></p>
    </ion-label>
</ion-item>

<!-- Edit. -->
<ion-item *ngIf="edit && field && field.shortname" class="ion-text-wrap" [formGroup]="form">
    <ion-label position="stacked">
        <span [core-mark-required]="required">{{ field.name }}</span>
        <core-input-errors [control]="control"></core-input-errors>
    </ion-label>
    <core-rich-text-editor [control]="control" [placeholder]="field.name" [autoSave]="true"
        [contextLevel]="contextLevel" [contextInstanceId]="contextInstanceId" [elementId]="modelName">
    </core-rich-text-editor>
</ion-item>
