ng-embed icon indicating copy to clipboard operation
ng-embed copied to clipboard

With froala editor it's showing error (Important)

Open ghost opened this issue 9 years ago • 2 comments

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 :disappointed:

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 avatar Jul 16 '16 08:07 ghost

can be an angular version issue. not sure.

ritz078 avatar Jul 16 '16 14:07 ritz078

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>

robman87 avatar Feb 01 '17 07:02 robman87