https://github.com/maranomynet/linkify
I’m using this plugin. It works, and everything’s fine. But is there an option I can plug into it so that if the url length is longer than “X”, then truncate it, and add “…”?
Right now the URLs are so long.
I notice in the demo there is a “handleLinks” callback function, but how do I use that?
You’re right, you can use
handleLinkscallback function. For example I wrote simple functional that you need:It truncates links if they longer than 10 characters. You can modify this script by your needs.