vue-truncate-collapsed icon indicating copy to clipboard operation
vue-truncate-collapsed copied to clipboard

It is removing image tag from html

Open mayank-shaan opened this issue 6 years ago • 5 comments

mayank-shaan avatar Nov 16 '18 06:11 mayank-shaan

Could you describe better your error and explain how reproduce the error? If is possible, use a website like jsfiddle.

kavalcante avatar Nov 16 '18 11:11 kavalcante

I'm closing this issue doing to inactivity. If your error persist, please reopen with a reproduction explanation.

kavalcante avatar Nov 26 '18 00:11 kavalcante

@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>'

ChristianLuxem avatar Feb 20 '19 12:02 ChristianLuxem

I'm having the same issue.

gbdematos avatar Sep 17 '19 19:09 gbdematos

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.

dnewkerk avatar Mar 16 '21 19:03 dnewkerk