ckeditor4-angular icon indicating copy to clipboard operation
ckeditor4-angular copied to clipboard

Support for DomSanitiser SafeHtml

Open Alextremeee opened this issue 3 years ago • 2 comments

Are you reporting a feature request or a bug?

Feature request

Provide detailed reproduction steps (if any)

The data input into the editor can't be prepopulated with content considered unsafe as binding data to a string value will cause all unsafe cotnent to be removed.

constructor(
    private sanitizer: DomSanitizer
 ) { }
sanitizedHtml = this.sanitizer.bypassSecurityTrustHtml( "<p class='foo'>Hello World!</p>"

...

<ckeditor [data]="sanitizedHtml"></ckeditor>

This means that although you can set the editor options allowedContent option to true you cannot pre-populate the editor with allowed content.

Expected result

It would be nice if you could pass a SafeHtml value in here as well as a string so the editor can be preopulated with bypassed content.

Alextremeee avatar Aug 12 '22 16:08 Alextremeee

It's been a while since we last heard from you. We are marking this issue as stale due to inactivity. Please provide the requested feedback or the issue will be closed after next 7 days.

github-actions[bot] avatar Aug 20 '22 09:08 github-actions[bot]

Sorry for the delayed reply.

 Your request sounds like a reasonable feature to implement, we will research this topic in the future.

Comandeer avatar Aug 20 '22 09:08 Comandeer