带有Angular的笔芯表,在编辑模式下不起作用 [英] Quill table with Angular, not working on edit mode
问题描述
我有一个Angular应用程序,我有一个表格并使用了quill-better-table(https://www.npmjs.com/package/quill-better-table )
I have an Angular Application, I have a form and used quill-better-table (https://www.npmjs.com/package/quill-better-table)
I have added configurations mentioned here (How do I fix this error I get whenever I try to register quill-better-table with my quill editor component in Angular 8?) When I am in insert mode it works and generate rich text which you can past tables also inserts the data into database when now I want to populate the data in edit mode, the rich textbox does not display the content.
div id="quill">
<p>Content *</p>
<quill-editor [styles]="editorStyle" placeholder="Enter Text" formControlName="myfieldCtrl" required>
</quill-editor>
</div>
推荐答案
在这里按照我的答案正确设置Angular中的Quill:
follow my Answer on how to setup Quill in Angular properly here:
下一步,我不确定如何设置角度,但DomSanitizer可能有问题
Next I am not sure how you setup your angular but it might be issue with DomSanitizer
我举了一个如何使用DomSanitizer的示例,这里的内容是羽毛笔
I put an example of how you can use DomSanitizer here the content is quill
在组件导入中:
import { DomSanitizer } from '@angular/platform-browser'
并使功能类似于以下内容
and make functions something like below
displayNewsfeed(newsfeed: INewsfeed) {
this.onenewsfeed = newsfeed[0];
this.textContent = this.HTMLSant(newsfeed[0].NewsfeedContent);
}
HTMLSant(html:string){
return this.sanitizer.bypassSecurityTrustHtml(html);
}
这篇关于带有Angular的笔芯表,在编辑模式下不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!