In my Angular 7 project, I am utilizing the PrimeNG Editor (based on Quill) and I have a need to customize the toolbar. Despite experimenting with various configuration options in both HTML and JavaScript, the only modification I have been able to make is adjusting the placeholder
property via HTML. Here is my approach, where I defined the Editor as a custom control:
#FormComponent.ts:
public controlDescription = new ControlEditor({
key: 'Description',
label: 'Description',
required: true
});
this.controls = [this.controlDescription, ... ];
#FormComponent.html:
<div comp-dynamic-control [form]="form" [control]="controlDescription"></div>
#ControlEditor.html:
<p-editor [formControlName]="control.key" placeholder='Compose text...'></p-editor>
I also attempted to directly use the Editor (without our Custom Editor) by adding the following code in FormComponent.html. However, despite importing import {EditorModule} from 'primeng/editor'; into the ControlEditor.ts file, the editor does not appear on the page. Any suggestions?
<p-editor formControlName="description" [style]="{'height':'320px'}"></p-editor>