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

List created even when list format is disabled #1256

Closed
haugstrup opened this issue Jan 10, 2017 · 2 comments · Fixed by #1257
Closed

List created even when list format is disabled #1256

haugstrup opened this issue Jan 10, 2017 · 2 comments · Fixed by #1257

Comments

@haugstrup
Copy link
Contributor

Typing 1. will always create a list item even if the list format is not enabled.

Steps for Reproduction

  1. Visit https://quilljs.com/playground/
  2. Insert formats: [], into Quill configuration
  3. Type 1. into editor

Expected behavior:

Nothing happens.

Actual behavior:

1. is converted into a list element

Platforms:

All.

Version:

1.1.9

@haugstrup
Copy link
Contributor Author

I think the fix in 576a074 is not the most optimal fix.

After updating to 1.1.10 I can no longer type 1. into Quill (with list format disabled). After typing the final space the 1. is deleted and I'm left with an empty editor. I think it'd be better to let the user type in 1. at the start of a line. I.e. if list is disabled just leave the 1. alone instead of deleting it.

You can try this out on the playground ( https://quilljs.com/playground/ ) using this configuration:

var quill = new Quill('#editor-container', {
  modules: {
    toolbar: [
      [{ header: [1, 2, false] }],
      ['bold', 'italic', 'underline'],
      ['image', 'code-block']
    ]
  },
  formats: ['bold'],
  placeholder: 'Compose an epic...',
  theme: 'snow'  // or 'bubble'
});

@jhchen
Copy link
Member

jhchen commented Jan 18, 2017

I think both your PR and 576a074 is necessary then. I will re-open and merge.

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

Successfully merging a pull request may close this issue.

2 participants