-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Unable to write "15. January 2024" due to automatic list identation #3953
Comments
When it got converted to |
Thank you for the quick response. It does work. Is there someway you can prevent this default behavior if number sequence is more than one digit? Do it for "9." but prevent the automatic formatting for "10." |
The easiest way is to customize the prefix regex in https://github.com/quilljs/quill/blob/v2.0.0-beta.0/packages/quill/src/modules/keyboard.ts#L543: import Keyboard from 'quill/modules/keyboard';
Keyboard.DEFAULTS.bindings['list autofill'].prefix = /^\s*?([01]\.|-|\*|\[ ?\]|\[x\])$/ |
Another quick alternative might be something like this: new Quill(editorEl, {
modules: {
keyboard: {
bindings: {
"list autofill": {
shortKey: true
}
}
},
},
}); This makes it so that the automatic list conversion only happens if "ctrl" + "space" is pressed. |
You can use quill-react-commercial. It can support your demands like below gif. It can start with any number in order list and can save this number in delta. |
Hi everybody
Is there someway you can disable automatic indentation to numbered list but still keep the numbered list available in the toolbar?
With the default settings for the editor you cannot write "15. January 2024" As it will change "15." to "1." as a numbered list.
Steps for Reproduction
Expected behavior:
Numbers stays like they are i.e "15."
Actual behavior:
Text is changed to a numbered list starting with the first number in the sequence i.e "1."
Platforms:
Windows 10, Chrome Version 120.0.6099.217
Version:
Latest
The text was updated successfully, but these errors were encountered: