我正在使用Summernote进行富文本编辑.我的输入字段具有必需的属性.
<input
required
id="summernote"
formControlName="description"
[ngxSummernote]="config"
/>
我有提交按钮.如果文本区域为空、原始或无效,则该选项将被禁用.代码如下.
<button
mat-raised-button
class="btn btn-danger pull-right"
type="submit"
(click)="submitDoc()"
[disabled]="
questionFormGroup.pristine || questionFormGroup.invalid
"
>
Post Question
</button>
If I copy-paste some text inside my summernote editor, the button will get enable But if I do ctrl+a and remove all the text present inside text editor, the button should be disabled since there is no text inside text-area.如果我提交表格,文本将包含如下值:
<br><div>
</div><div>
</div><div>
</div><div>
</div><div>
</div><div>
</div><div>
</div><div>
</div><div>
</div><div>
如何将此wrt解析为summernote.Button enabled image here和text area contents here.
这是我的表格组:
createQuestionFormGroup(): void {
this.questionFormGroup = this.formBuilder.group({
heading: undefined,
description: undefined,
});
}