Quill: Linebreak within a list item

Created on 14 Jun 2017  路  5Comments  路  Source: quilljs/quill

Most traditional editors allow to enter break line within a list item. "Enter" key usually create a new list item, while "Shift-Enter" usually break the line, but stay in the same list item. i.e. does not create a new bullet number.
Note: CSS supports break lines within list items. see example here.

Steps for Reproduction

Enter a numbered list

  1. fist list item
  2. second list item, break line !here! but stay in list item
  3. third list item

attempt to breakline at "!here!", without creating a new list item.

Expected behavior:

By using some supported API and some UI (e.g shift enter), break the second list item so the result will be:

  1. fist list item
  2. second list item, break line
    !here! but stay in list item
  3. third list item

Actual behavior:

No way to do it to the best of my knowledge. Enter key results in

  1. fist list item
  2. second list item, break line
  3. !here! but stay in list item
  4. third list item

Version:
1.2.6

duplicate

Most helpful comment

252 asks for a compelling use case. i don't understand how this isn't it?

this behavior has been part of microsoft word (and every other rich text editor i've ever used) for as long as i can remember.

image

i'd argue that -- from a user perspective -- enter/shift+enter is as-expected in a rich text editor as ctrl+c/ctrl+p.

All 5 comments

i think it is a duplicate of #252

252 asks for a compelling use case. i don't understand how this isn't it?

this behavior has been part of microsoft word (and every other rich text editor i've ever used) for as long as i can remember.

image

i'd argue that -- from a user perspective -- enter/shift+enter is as-expected in a rich text editor as ctrl+c/ctrl+p.

@ile that gist is going to a 404 for me.

Was this page helpful?
0 / 5 - 0 ratings