2

I'm stuck with an inception propblem :

<!-- html -->
<div class="well well-small" ng-bind-html="annotation"></div>

--

//Javascript
$scope.annotation = $scope.content;
for (it in words) {
    var tooltip = '<ul>' +
    '<li>' + words[it].info + '</li>' +
    '<li>' + words[it].name + '</li>' + 
    '<li>' + words[it].lol + '</li>' +
    '</ul>';

    $scope.annotation = $scope.annotation.replace(words[it].label, "<a tooltip-html-unsafe='" + tooltip + "'>" + words[it].label + "</a>");
}

So basically, annotation get a string, and I loop in 'words' to replace expressions presents in 'annotation' by the same but with a tooltip containing a list (ul) of informations.

Yet, even if the content appear, with words underlined in blue (like a link) I cannot find the tooltip.

Anyone knows where my problem would be ?

Thanks a lot !

1
  • Still no answers. I'm starting to think that this is impossible. Commented Mar 11, 2014 at 10:12

1 Answer 1

2

Since nobody was able to anwser this (and it seems that there is no solution yet) I found another way to do a list inside a tooltip, without a tooltip-html-unsafe :

Basically you use the Unity Codes so instead of

'<li>' + words[i] + '</li>'

you get

'&#187;' + words[i] + '&#10;'

Where #187; stand for » and #10; for a new line.

Hope the two people who wanted an anwser (beside me) are satified, or else, maybe we can discuss further this issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.