You emploied an intermediate Node bundlep, and it works.
And I want to figure out why my content spec is not working.
It seems your content spec is equivalent to mine in respect to content expressions.
So I guess there must be some rule on how to organize the schema to make it work.
I checked the content expressions part in https://prosemirror.net/docs/guide/ , but found nothing.
Your content spec was like value1+ value2 and content expressions says value1 value2+. Seems like your content spec is not supported. I gave you a workaround till you further investigate.
I am not quite understand here.
In myblock the content expressions is paragraph+ mytag. What is the difference between content spec and content expressions?
Oops i meant content expressions.
If you see in docs there isn’t any example of value1+ value2 rather the examples says value1 value2+. So apparently you can’t add multi block on the first of content expressions.
P.S: I am so much stuck on my nodespecs so i mistakenly wrote content spec instead of content expressions.
But if multi block on the first of content expressions does not work, then I think it must be specified in the guide. It is not apparent (at least to me).
This has nothing to do with + operators not being supported in certain positions.
What is going on is that the main default Enter command (splitBlock) doesn’t know how to handle the case where the cursor is in a block that has to be the last element of its parent. It can’t split the block or create a new block after it.
So what you’ll have to do is add a custom command, which does whatever you want to happen in this situation (which isn’t obvious—I guess escaping the parent myblock node and creating a block after it would be the only workable approach), and bind it to Enter (along with, and with a lower predecence than, the standard commands bound to Enter), so that it can handle this situation.