vue-truncate-collapsed
vue-truncate-collapsed copied to clipboard
It is removing image tag from html
Could you describe better your error and explain how reproduce the error? If is possible, use a website like jsfiddle.
I'm closing this issue doing to inactivity. If your error persist, please reopen with a reproduction explanation.
@kavalcante it is really removing the image tag from HTML. You can try the following setup:
<truncate class="__object_summary" collapsed-text-class="collapsed" :clamp="More"
:length="500" :less="Less" type="html"
:text="object.summary"></truncate>
where object.summary is the following string:
'<p dir="ltr"><a href="Bild.jpg"><img src="Bild.jpg" alt="Bild"></a><br></p>'
I'm having the same issue.
This is due to the keepImageTag option of the html-trunctate dependency, which is false by default. There's currently no way to affect the html-truncate options through vue-truncate-collapsed. It might be a good solution to expose this option (as well as the ellipsis option) as props on vue-truncate-collapsed.