How to hyphenate a string/text in a textarea using

2019-07-20 14:58发布

I am not able to hyphenate strings using jQuery. It seems there is no library available. I tried this link but failed. Please help if you know how to hyphenate a string in a textarea according to a textarea's width using a jQuery plugin.

2条回答
霸刀☆藐视天下
2楼-- · 2019-07-20 15:43

As of 2016 there is another JavaScript library available that you could use: https://github.com/ytiurin/hyphen

Compared to Hypher, hy-phen is easier to include on your page, since it does not depend on Node.js or jQuery. You simply have to include the JavaScript file for the library and the pattern file for your desired language using a <script> tag.

查看更多
Deceive 欺骗
3楼-- · 2019-07-20 16:04

I think Hypher is what you're looking for:

https://github.com/bramstein/hypher

查看更多
登录 后发表回答