As already mentioned in another topic (here) there is a problem to get lists with a single paragraph per list_item just by using
nodes: addListNodes(schema.spec.nodes, "paragraph", "block")
Aside from the problem with the Backspace
key there is also a problem with the wrapInList
function:
when nodes: addListNodes(schema.spec.nodes, "paragraph*", "block")
is used
if one selects several paragraphs from the document and then executes wrapInList
- the formatting works and the result is a list with a single paragraph per list_item
.
when nodes: addListNodes(schema.spec.nodes, "paragraph", "block")
is used
if one selects several paragraphs and then executes wrapInList
nothing happens - why is it so? The definition with single paragraph allows in theory the same result as with "paragraph*"
but it does not work. There is a
var wrap = findWrapping(outerRange, listType, attrs, range);
if (!wrap) {
return false;
}
in the wrapInList
and it is always null
when single paragraph
is used (instead of paragraph*
).