initialize primeng editor component with existing data

Discussão em 'Angular' iniciado por Sarmad Raees Khan, Outubro 16, 2024.

  1. Hi this is my editor editor.component.html where i am using primeng editor. i am using it in a form that allows to fill this editor either while creating a meeting or editing it. In the case of create, everything is working normally, in my payload i send an html of whatever i write in the editor.

    The problem is, when i want to edit a meeting, and i open the form, i expect this editor to be pre-filled but its empty.

    <div class="editor">
    <div>
    <label *ngIf="showLabel" for="editor">{{ label }}</label>
    <span *ngIf="required" class="required-asterisk">*</span>
    </div>
    <p-editor
    [(ngModel)]="value"
    (onInit)="onEditorInit($event)"
    (onTextChange)="onTextChange($event)"
    [readonly]="readOnly"
    [style]="{ height: '400px', width: '500px', 'overflow-y': 'auto' }"
    ></p-editor>
    <p>Tag: [title] [start_date] [start_time] </p> </div> import { CommonModule...onent-with-existing-data"]Continue reading...

Compartilhe esta Página