Open suture opened 9 years ago
Hi Suture, during the collapse HTML is stripped because there are cases where there can be images,videos,list and other block level items with each having separate CSS properties and different margin and padding. So collpasing the element to a particular line is quite challenging and may not work in all sites with different base CSS. Since collpaser also suports collpasing to particular characters this scenario also has to be handled gracefully.
This feature can be implemented but not on by default. Should be enabled on demand through an additional property. I'll try to work on this.
Hi Vaakash
Yes understand. Many thanks for getting back to me.
I too would like to have this feature. When I have a ul/ol list, the bullets/numbers are removed, so the truncated block looks like a giant mess of an incomplete sentence.
Thanks.
+1 This could be very very useful.
Why not just strip image, video, and media tags and nothing else? There should be a property for "allowed tags" and could be used at the risk of the User.
In Wordpress I use this plugin Advanced Excerpt https://wordpress.org/plugins/advanced-excerpt/ which allows you to choose which tags get stripped. It somehow manages to prevent any issues with truncated closing tags.
@suture Let me check that for a reference try to implement the same. @bcrigler The problem which I got during testing is, when the "divs", "span" tags in collapsible element had a different a padding, margin then it was odd for the collpase animation. I'll anyway try to implement the same as many request it.
Is it possible to prevent stripping html when no truncation is needed?
For example if truncation kicks in at 5 lines, but you only have 4, in this scenario, it becomes impossible to see the html version.