Skip to content

Support for DomSanitiser SafeHtml #233

@Alextremeee

Description

@Alextremeee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:confirmedAn issue confirmed by the development team.type:featureA feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions