New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control wrapping behaviour for block marks #43

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@eshvedai
Copy link

eshvedai commented Jan 7, 2019

Our discussion on this: https://discuss.prosemirror.net/t/block-marks-wrapping-behaviour/1718

Let me know if it looks good and I'll add some tests.

@eshvedai eshvedai force-pushed the eshvedai:eshvedai/disable-block-marks-wrapping branch from 9085e82 to 8a25b40 Jan 7, 2019

@marijnh

This comment has been minimized.

Copy link
Member

marijnh commented Jan 21, 2019

This approach will also prevent reusing of mark nodes during redraw—you'll have to find some way to do this that doesn't have that as a side effect (maybe do the check further up, in syncToMarks, by always exiting non-spanning marks when they already have a child node).

Also, the doc comments for MarkSpec in prosemirror-model should be updated to mention this property.

@eshvedai

This comment has been minimized.

Copy link

eshvedai commented Jan 21, 2019

you're right, it is pretty bad. I updated the PR, looks like it doesn't re-create nodes with this change, have a look!

@marijnh

This comment has been minimized.

Copy link
Member

marijnh commented Jan 22, 2019

Yes, that looks a lot better. But this will also need an accompanying PR in prosemirror-model that documents the spec property and implements it in DOMSerializer.

@eshvedai

This comment has been minimized.

Copy link

eshvedai commented Jan 22, 2019

Sure thing. Just to confirm my understanding, what do you mean exactly by implementing it in DOMSerializer? What's the expected result?

@marijnh

This comment has been minimized.

Copy link
Member

marijnh commented Jan 23, 2019

what do you mean exactly by implementing it in DOMSerializer? What's the expected result?

When serializing adjacent nodes with spanning: false marks across them, the marks should be rendered separately per node, just like in the editor view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment