2016-09-05 3 views
0

호버링시 보충 정보를 보여주는 일련의 팝업이 있습니다. 문자는 표시되지만 문자열의 첫 단어 만 표시합니다.부트 스트랩 팝 오버는 한 단어의 문자열 만 표시합니다.

템플릿 :

<a data-toggle="popover" data-trigger="hover" data-content={{std.Description}} >&nbsp;<i class="fa fa-question"></i></a> 
... 
$("[data-toggle=popover]").popover(); 

문제의 필드는 장고 TextField입니다 :

Description = models.TextField(blank=True) 

동작 : enter image description here

이 설명은 여러 말을했다,하지만 첫 번째 결국은 절단 떨어져서.

답변

1

해결 방법은 Contain form within a bootstrap popover?과 동일하지만 게시물 제목이 오도 할 수 있습니다. 당신이 팝 오버 (목록, <br>, 등) HTML을 포함 할 경우,

data-content="{{std.Description}}" 

또한 data-html="true"을 포함한다 : 문제가 원하는 변수를 포함 인용 할 필요가있다.

관련 문제