showdownjs / ng-showdown

Angular integration for Showdown
BSD 3-Clause "New" or "Revised" License
105 stars 33 forks source link

Directive broken when using jQuery (instead of jqLite) #19

Closed phw closed 9 years ago

phw commented 9 years ago

This is related to #14 and #17 , just adding it here so it doesn't get lost. See my comment on #17:

Ok, found the core issue why the code doesn't work for me: I am using full jQuery and not only the JQlite bundled with angular. In it seems element.html behave a bit differently there, which results in jQuery not outputting anything.

That means passing the result of $sce.trustAsHtml() to element.html() works with jqLite (the jQuery like implementation bundled with angular), but not with the full jQuery.

@SyntaxRules mentioned a fix he had in mind:

I want to add in one more fix for line 174. It will include passing the output straight to a directive, instead of using angular.element. Which will fix the problem @phw was having. I'm hoping to have it done tuesday.

dardub commented 9 years ago

I believe this bug is in the tagged 1.0.0. Can we get an updated build so we can use this directive with bower?

phw commented 9 years ago

The bug is present in the 1.0.0 tag, yes, but also still on the development and master branches. An updated version wouldn't help unless a bugfix gets committed.

tivie commented 9 years ago

Indeed. @SyntaxRules seems to have a fix in mind. Any update on this?

SyntaxRules commented 9 years ago

Closed with version 1.0.1.

@phw Thanks for the detailed write up on the issue. Sorry it took me so long to get around to fixing it. Can you confirm this fixes it for you?