agentejo / cockpit

Add content management functionality to any site - plug & play / headless / api-first CMS
http://getcockpit.com
MIT License
5.4k stars 524 forks source link

japanese language support in wysiwyg renderer #1491

Open konikoni428 opened 2 years ago

konikoni428 commented 2 years ago

When I try to view information in the wysiwyg editor written in Japanese on the list of entries page, it only shows "...". This is happend if it is more than 50 characters.

e.g.

"ここに文字列が入ります。ここに文字列が入ります。ここに文字列が入ります。ここに文字列が入ります。ここに文字列が入ります。”

expect

"ここに文字列が入ります。ここに文字列が入ります。ここに文字列が入ります。ここに文字列が入ります。ここに..."

real

"..."

The problem occurred because Japanese does not separate words with spaces. So I changed it so that the last word is deleted only when there are three or more words separated by spaces.