![](/img/trans.png)
[英]How can I add validation using ql-image on p-editor in angular?
[英]How to set properties keyup in <p-editor> with angular js?
我不能在 p-editor 中使用 properties keyup,也許你們中的任何人和我有同樣的問題,請幫助我:))
TS
getValueStatement(event: any)
{this.valueStatement = event;}
getValueCaption(event: any)
{this.formEmailTemplates.controls['template'].setValue(this.valueStatement + event.label);}
HTML
<p-dropdown [options]="captions" [(ngModel)]="selectedCaption"
placeholder="Select a Caption" optionLabel="label
[showClear]="true"
(onChange)="getValueCaption($event.value)">
</p-dropdown>
<p-editor pInputTextarea type="text" formControlName="template"
[style]="{'height':'300px', 'width':'869px'}"
(keyup)="getValueStatement($event.target.value)"
></p-editor>
實際上,如果我嘗試使用輸入或文本區域,我想將下拉列表中的值設置為 p-editor,但如果使用 p-editor 為什么不工作?
真的謝謝大家
嘗試使用輸入事件而不是像這樣的 keyup
HTML 代碼:
<p-editor pInputTextarea type="text" formControlName="template"
[style]="{'height':'300px', 'width':'869px'}"
(input)="getValueStatement($event)"
></p-editor>
文件:
getValueStatement({ target }){
const { value } = target;
this.valueStatement = value;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.