Dragging a list item from an unordered list creates an ordered list

But when you copy paste one list item, it keeps the type of the original list.

I looked through the transaction code and:

  • when I drag a list item outside a list, it just knows it’s a list item.
  • at the replace stage, it needs a wrapper and the first one it finds that matches is an ordered list. I think the relevant code is in computeWrapping (model/src/content.js)

Any suggestions?

I’m seeing the same behavior for copy/paste, when selecting the list item node. With a text selection, dragging and copy/paste both preserve the list style.

This is kind of by design – a node selection gives you only precisely the selected node, whereas a text selection is more fuzzy, and will carry some context.

any chance to make the default list an unordered one.

Dragging from an unordered list and getting a new ordered one is pretty unintuitive.

You can flip the order of the definitions of ordered_list and bullet_list in your schema to get this effect. You’re right that that might be a better default. I’ll think about it.

thanks, I’ll try it. (thought the schema was a dictionary not a list)

It’s an ordered dictionary.

1 Like

thanks, worked for me