Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

With froala editor it's showing error (Important) #43

Open
ghost opened this issue Jul 16, 2016 · 2 comments
Open

With froala editor it's showing error (Important) #43

ghost opened this issue Jul 16, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2016

Hi,

I'm using froala editor to insert some wisywig functionality to my post. i'm also using ng-embed on it. like this.

<span froala-view="post.body | embed"></span>
then it's showing this error 😞

Error: [$sce:itype] Attempted to trust a non-string value in a content requiring a string: Context: html
error link

froala editor angular version im using

What i should do now ?

@ghost ghost changed the title with froala editor it's showing error With froala editor it's showing error (Important) Jul 16, 2016
@ritz078
Copy link
Owner

ritz078 commented Jul 16, 2016

can be an angular version issue. not sure.

@robman87
Copy link
Collaborator

robman87 commented Feb 1, 2017

Sound like post.body contains html nodes, it's not a string/text. angular-sanitize used by ng-embed is expecting a string. If you convert post.body to a string it will probably work. Take a look here. You should also turn of the htmlSanitize option in ng-embed as well so html tags don't get stripped away.
<span froala-view="postBodyAsString | embed:{htmlSanitize:false}"></span>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants