bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Popover - "data-html='true'" equivalent option not available

Open callmekatootie opened this issue 13 years ago • 47 comments

Hello,

For the popover attribute, I am passing HTML code as follows: <h6>Foo</h6>

However, instead of displaying the "Foo" statement with the h6 tag applied, I get the code as it is, that is the popover content is also <h6>Foo</h6>.

In the Twitter Bootstrap popover, one could specify "data-html='true'" to identify the popover content as being HTML code and that it needs be parsed before display, but I do not see any such option for the Angular UI Bootstrap Popover...

callmekatootie avatar Jun 14 '13 09:06 callmekatootie

@callmekatootie

take a look here: https://github.com/angular-ui/bootstrap/issues/220

jhiemer avatar Jun 14 '13 14:06 jhiemer

@joshdmiller Do you think that adding a html-unsafe version of a popover makes sense? Ir should we really focus on #220?

pkozlowski-opensource avatar Jun 14 '13 17:06 pkozlowski-opensource

It's certainly easier to use a popover-html-unsafe version instead of a template, but I've never liked the idea of passing HTML into attributes. But since we did this for the tooltip, it may make sense to do it for the popover as well. If it's something the community wants, I can put out a PR this weekend - it's super trivial to implement. One caveat is that the *-html-unsafe versions, like ng-bind-html-unsafe, do not compile the contents, so directives cannot be used in the provided HTML.

As for #220, I am not exactly sure what's causing the scope bug on the contents but haven't had enough time to really dive into it. I hope to get back into a regular schedule on my open-source commitments this week and this is one of the first things I want to solve.

joshdmiller avatar Jun 15 '13 06:06 joshdmiller

+1 to add popover-html-unsafe

NeCkEr avatar Jun 20 '13 10:06 NeCkEr

+1 ^

mattymess avatar Jun 21 '13 19:06 mattymess

+1 to add popover-html-unsafe

dcg avatar Jul 03 '13 13:07 dcg

+1 this would be useful

franciscopreller avatar Jul 08 '13 08:07 franciscopreller

Has this been implemented in angular-ui yet? I would really like to be able to put html in my popovers!

RobbieTheWagner avatar Jul 17 '13 13:07 RobbieTheWagner

Move discussion to #641 :-)

ajoslin avatar Jul 27 '13 17:07 ajoslin

Using template is too complicated. I just want show some text with format, nothing fancy.

miliu99 avatar Apr 04 '14 02:04 miliu99

+1

ghost avatar Apr 07 '14 20:04 ghost

+1

jansoren avatar Apr 14 '14 09:04 jansoren

+1

lcerveau avatar Apr 23 '14 22:04 lcerveau

+1 "Using template is too complicated. I just want show some text with format, nothing fancy."

cubasuarez avatar Apr 28 '14 14:04 cubasuarez

I agree with everyone else. This is something I've really been waiting for. Just being able to use basic HTML in my popovers for better formatting.

drewrawitz avatar Apr 30 '14 18:04 drewrawitz

:+1:

dalpo avatar May 23 '14 10:05 dalpo

+1

mtreitz avatar May 24 '14 23:05 mtreitz

+1

AlexZeitler avatar May 27 '14 15:05 AlexZeitler

+1

avizuber-zz avatar Jun 03 '14 15:06 avizuber-zz

This is SO needed.

jollyGreenGiant007 avatar Jun 11 '14 18:06 jollyGreenGiant007