fix(workflow): line break not supported by Send Email Nodes#16561
fix(workflow): line break not supported by Send Email Nodes#16561etiennejouan merged 2 commits intotwentyhq:mainfrom
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where line breaks created in the Tiptap Editor were not being rendered in Send Email Nodes. The Tiptap Editor creates a 'hardBreak' node type for line breaks, but there was no renderer defined for this node type, causing it to be ignored.
- Added support for rendering Tiptap's
hardBreaknode type as HTML<br />elements - Registered the new
HARD_BREAKnode type constant in the shared Tiptap configuration - Created a new renderer function that converts
hardBreaknodes to React<br />elements
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/twenty-shared/src/utils/tiptap/tiptap-marks.ts |
Added HARD_BREAK constant to the TIPTAP_NODE_TYPES enum for consistency between frontend and email renderer |
packages/twenty-emails/src/utils/email-renderer/renderers/render-node.tsx |
Imported and registered the hardBreak renderer in the NODE_RENDERERS mapping |
packages/twenty-emails/src/utils/email-renderer/nodes/hard-break.tsx |
Implemented the hardBreak renderer function that returns a <br /> element |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Added test as coverage dropped below threshold. |
etiennejouan
left a comment
There was a problem hiding this comment.
Hi @abk404 , Thank you for your contribution. It works fine 👏
|
Hey @etiennejouan! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
|
Thanks @abk404 for your contribution! |

Closes #16557
Tiptap Editor (which the Send Email Node uses) , creates a content json with type 'hardBreak' for line breaks.
The was no rederer defined for this
hardBreaknode type, so therenderNodefunction was ignoring that node (returning null).Fix : Added a renderer for
hardBreaknode type.