Skip to content

Conversation

matthewlipski
Copy link
Collaborator

When you press Shift+Tab in a block, it creates a new line in the same block which TIpTap/ProseMirror store as a hardBreak node. It turns out we completely forgot about these when doing inline content conversions, so this PR remedies that.

This also fixes the Empty text nodes are not allowed error that some people have been getting, mentioned in issues #184 and #216.

Closes #184
Closes #216

@vercel
Copy link

vercel bot commented Jun 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocknote-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2023 11:51am

@YousefED
Copy link
Collaborator

YousefED commented Jun 2, 2023

Nice find!!

I think programmability wise, it would definitely be easier if we could just represent it with \n as you suggested. Do you think this will be doable? Maybe we should first double check what prosemirror does when you pass \n in text of a node - just to make sure we won't break any other already existing behavior around \n

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some questions. Also, can you add unit tests similar like we have for the links?

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the comments to inside the branches, imo more readable.

Besides that I think it's good to go

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]Empty text nodes are not allowed RangeError: Empty text nodes are not allowed (on editor.blocksToMarkdown)

2 participants