<!-- Read only -->
<ion-item text-wrap *ngIf="!edit && text">
    <h2>{{ plugin.name }}</h2>
    <p *ngIf="words">{{ 'addon.mod_assign.numwords' | translate: {'$a': words} }}</p>
    <p>
        <core-format-text [component]="component" [componentId]="assign.cmid" [maxHeight]="80" [fullOnClick]="true" [fullTitle]="plugin.name" [text]="text"></core-format-text>
    </p>
</ion-item>

<!-- Edit -->
<div *ngIf="edit && loaded">
    <ion-item-divider text-wrap color="light">{{ plugin.name }}</ion-item-divider>
    <ion-item text-wrap *ngIf="configs.wordlimitenabled && words >= 0">
        <h2>{{ 'addon.mod_assign.wordlimit' | translate }}</h2>
        <p>{{ 'core.numwords' | translate: {'$a': words + ' / ' + configs.wordlimit} }}</p>
    </ion-item>
    <ion-item text-wrap>
        <core-rich-text-editor item-content [control]="control" [placeholder]="plugin.name" name="onlinetext_editor_text" (contentChanged)="onChange($event)" [component]="component" [componentId]="assign.cmid"></core-rich-text-editor>
    </ion-item>
</div>
