-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
The enter should not be counted as a character #2574
Comments
I think we should define some rules how words and characters are calculated. It should be also considered how word-count integrates with other plugins, like placeholder, tables, images, media embed etc. |
Related issues:
|
I think it's best to check how it works in other editors (Word, GDocs). And see if there's some standard. |
Fix: Improve words recognition, remove enter from counted characters. Closes #4. Closes #5.
My Question is when i integrate ckeditor into our Project then there is a task about to show character count whatever'd content paste into ckeditor then i saw a difference between the Microsoft word and Ckeditor which has too much difference. Here I posted the difference of both, can anyone give solution how can i overcome this problem ? In above I pasted same content in ckeditor, Google Docs and Microsoft word , every editor has different result. below is my code for the reference. `const ReviewerNotes = ({
}; return ( Reviewer notes (Minimum 100 characters) <TextEditor editorState={notes} error={!!errorMessage} characterCount={{ isShown: true, character: characterLength, }} stripPastedStyles onEditorStateChange={onNotesChange} onReady={scrollAndFocusEditor} /> {errorMessage} </> ); }; import { forwardRef, useMemo } from 'react'; import './editor.scss'; const editorConfig = { const TextEditor = forwardRef(( const handleEditorContentChange = (_event, editor) => {
}; const appliedConfiguration = useMemo(() => ({ const handleEditor = (editor) => {
}; return (
) : null} ); });` |
Right now the newline is used to denote blocks and inline elements.
As @msamsel noticed it shouldn't count as a character:
The text was updated successfully, but these errors were encountered: