addMark allowing leaf nodes #22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/add-mark-allow-leaf-node-"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Regarding this discussion( https://discuss.prosemirror.net/t/discussion-what-are-marks/862/16 ), I suggest addMark allowing leaf nodes, as I think it not affect the Mark model you mentioned.
This would be a breaking change, and one that definitely is going to cause problems, so no, not going to merge this.
@marijnh At present, we have encountered the problem that mark needs to be added on the block node.
However, setNodeMarkup will bring the mapping change, which will leads to the conflict merging problem in the collaborative scenario.
However, addMark has no problem. Therefore, we hope to reuse addMark & AddMarkStep as much as possible to solve the current problem.
Do you have any suggestions for us to reuse addMark or another solutions?
We look forward to your reply : )
Does attached patch look like it would address this issue for you?
Thanks for your reply.
Yes, it looks like it will solve my problem. In fact, I made a patch locally through a prototype chain rewrite, but I'm not sure if it will cause another problems that I haven't considered.
Do you think there will be any problems if we modify it according to this PR?
Do you mean merging this PR after all? As I said, that's not happening.
NoNoNo, I just want to make sure that if I do this on my fork(NOT mergeing this PR), will it cause a problem?
You'll likely see marks applied at multiple levels of your document tree, but other than that it might be unproblematic.
Ok, I understand - The current implementation does not consider that Inline nodes may also have leaf nodes.
Thank you for your reply, which has taken up your time. : )
Pull request closed