PrimeNG - 在所有情况下删除图像功能(使用按钮、拖放、粘贴)
我正在将 PrimeNG 用于 Angular 13 应用程序:
<p-editor
(onTextChange)="onTextChange($event)"
class="custom-primeng-editor"
[placeholder]="placeholder"
></p-editor>
我不想启用图像功能。我删除了按钮:
public ngAfterViewInit(): void {
const imgButton = document.getElementsByClassName('ql-image');
for (let i = 0; i < imgButton.length; i++) {
imgButton[i].remove();
}
}
但用户可以将图像拖或粘贴到编辑器中。如何在所有情况下禁用图像功能?
I'm using PrimeNG for Angular 13 application:
<p-editor
(onTextChange)="onTextChange($event)"
class="custom-primeng-editor"
[placeholder]="placeholder"
></p-editor>
I don't want to enable image feature. I removed the button:
public ngAfterViewInit(): void {
const imgButton = document.getElementsByClassName('ql-image');
for (let i = 0; i < imgButton.length; i++) {
imgButton[i].remove();
}
}
But the user may drag or paste the image to the editor. How can I disable image feature in all case?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论