8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputRichText统计的字符有问题.
你是如何使用 amis 的? sdk、npm 或其他...
sdk
npm
其他
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
粘贴有问题的完整 amis schema 代码:
amis schema
{ "type": "page", "body": { "type": "form", "api": "/amis/api/mock2/form/saveForm", "body": [ { "type": "input-rich-text", "name": "rich", "label": "Rich Text" } ] } }
The text was updated successfully, but these errors were encountered:
试了下 点击后是字符,默认显示是字 应该默认显示的是中文字数,字符才是真正的你想看到的字数 帮你搞了个解决方法,原理是加载完成后帮你点击一下字数,就默认显示字符了
{ "type": "page", "body": [ { "type": "form", "api": "/amis/api/mock2/form/saveForm", "body": [ { "type": "input-rich-text", "name": "rich", "label": "Rich Text", "id": "u:c257075b6d3c", "vendor": "tinymce", "options": { "plugins": "advlist,autolink,link,image,lists,charmap,preview,anchor,pagebreak,searchreplace,wordcount,visualblocks,visualchars,code,fullscreen,insertdatetime,media,nonbreaking,table,emoticons,template,help", "toolbar": "undo redo bold italic backcolor alignleft formatselect aligncenter alignright alignjustify bullist numlist outdent indent removeformat help", "menubar": true } } ], "id": "u:bd206f81ec62", "actions": [ { "type": "submit", "label": "提交", "primary": true, "id": "u:55e757a5351d" } ], "feat": "Insert", "dsType": "api", "labelAlign": "left" } ], "id": "u:82e74885313f", "asideResizor": false, "pullRefresh": { "disabled": true }, "onEvent": { "init": { "weight": 0, "actions": [ { "ignoreError": false, "script": "let attempts = 0;\nconst check = setInterval(() => {\n const b = document.querySelector(\"button.tox-statusbar__wordcount\");\n attempts > 50 ? clearInterval(check) : b && (clearInterval(check), setTimeout(() => b.click(), 100));\n}, 100);", "actionType": "custom", "args": {} } ] } } }
主要代码:
let attempts = 0; const check = setInterval(() => { const b = document.querySelector("button.tox-statusbar__wordcount"); attempts > 50 ? clearInterval(check) : b && (clearInterval(check), setTimeout(() => b.click(), 100)); }, 100);
欢迎加入最大的,人数最多的,含佬量极高的社区群 Amis社区交流群【QQ1群】:717791727 Amis社区交流群【QQ2群】:721182449
Sorry, something went wrong.
No branches or pull requests
描述问题:
InputRichText统计的字符有问题.
截图或视频:
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的?
sdk
、npm
或其他
...amis 版本是什么?请先在最新 beta 版本测试问题是否存在
粘贴有问题的完整
amis schema
代码:1、聚焦,连续输入多个a
2、观察右下角,展示的字符数有问题。当点击字符数后,字符数更新
The text was updated successfully, but these errors were encountered: