Hi Renan,
Greetings from Syncfusion support.
We have validated your queries.
Query1: How to use pasteCleanupSettingsModel/deniedtags?
You can assign the pasteCleanupSettingModel value directly to the pasteCleanupSettings property. We have prepared a sample for your reference please get it below.
Code Snippets:
app.component.html
<ejs-richtexteditor id="pasteCleanupRTE" #pasteCleanupRTE [pasteCleanupSettings]="pasteCleanupSettings" (afterPasteCleanup)="afterPasteCleanup($event)" >
<ng-template #valueTemplate> </ng-template> </ejs-richtexteditor> |
app.component.ts
Query 2: And also, if the pasted content has e.g. a nav tag and I want to replace it with div, how can I do that?
You can change the pasted value using the afterPasteCleanup event. Using this event, we have changed the nav tag to the div tag using the regex.
Code Snippets:
public afterPasteCleanup(e) {
e.value = e.value.replace(/(<nav)/gim,'<div').replace(/<\/nav>/gim, '</div>'); } |
Gunasekar