Vanessa219 / vditor

♏ 一款浏览器端的 Markdown 编辑器,支持所见即所得(富文本)、即时渲染(类似 Typora)和分屏预览模式。An In-browser Markdown editor, support WYSIWYG (Rich Text), Instant Rendering (Typora-like) and Split View modes.
https://b3log.org/vditor
MIT License
8.09k stars 844 forks source link

你好,支持自定义字数统计吗 #1613

Closed dengsong666 closed 3 months ago

dengsong666 commented 3 months ago

自带的字数统计,底层似乎是str.length,表情的统计不准,支持自定义统计吗?

tenglongwentian commented 3 months ago

举个例子?

dengsong666 commented 3 months ago

举个例子?

比如表情的长度在js中可能会按2到3个字符算,甚至更长,但我想把它当成一个字符,还有图片链接之类的,我想仅计算![我是图片](https://xxx/123.jpg)4个字符,但Vditor也把url算上了,不过这似乎不是必须的,我也不需要精确统计,就这样吧