Skip to content
New issue

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

Significant delay character counter (react native) #142

Open
Allen-pie opened this issue Jan 17, 2025 · 0 comments
Open

Significant delay character counter (react native) #142

Allen-pie opened this issue Jan 17, 2025 · 0 comments

Comments

@Allen-pie
Copy link

Allen-pie commented Jan 17, 2025

I tried creating a live character counter for quillEditor, but the delay is so significant especially when deleting the content.
Is there a way to fix this?

`const [count, setCount] = useState(0);
<QuillEditor
container={true}
ref={editorRef}
onHtmlChange={(data: HtmlChangeData) => {
const text = data.html.replace(/<[^>]+>/g, '');
setCount(text.length);
}}
/>

Character Count : {count} `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant