Open DenverCoder1 opened 8 months ago
Interesting idea, I think for right now this is out of scope. I think it would be worth revisiting once the next version comes out.
Thanks for the response.
If you do end up making this possible, a cleaner solution than supporting changing the function could be to just allow setting the shortDescription
via an HTML attribute similar to how it can be done with description
. If the shortDescription
is provided and the user is on mobile, it could add the "See more" link to it and set the element to have that instead of trimming it with the slideShortDesc
function and only if shortDescription
is not provided, the slideShortDesc
will need to be called.
On mobile, when the short description is created and the See more link is generated, the HTML tags get removed. Solutions provided in other issues such as #299 suggest disabling the short description with
moreLength
, but instead of doing this, I would rather create a different short description with HTML that has the See more link, in other words I'd like to customize the behavior of theslideShortDesc
function.Explain why the feature is useful Descriptions can contain advanced styling such as headers and UI chips at the start of the description and these don't appear nicely when converted to text. I would like a way to make the header and UI chips always appear the same in the short description and only the paragraphs afterwards should be abbreviated.
My current workaround is to change the behavior after the slide is loaded using code I copied from slide.js, but it would be nice if there was a way to easily access and override the internal methods.