-
Notifications
You must be signed in to change notification settings - Fork 117
feat(markdown-editor) : SHIFT+ENTER inserts a linebreak #188
Conversation
Signed-off-by: Dan Selman <danscode@selman.org>
One issue is you are unable to exit a block quote with pressing ENTER twice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I can reproduce this too. In the deployed version, we are able to exit block quotes by hitting enter twice. In this one, we aren't. Exiting lists by hitting enter twice still works. |
Pressing shift+enter right before a Clause Template causes an error |
actually I'm getting this error more than just when I press shift+enter before a Clause Template, is anyone else experiencing this? |
Can you create a new issue for this please? It sounds like this is not a regression introduced by this PR. |
The issue breaking out of block quotes seems to be related to: (It's pretty confusing that the @DianaLease @irmerk I don't remember writing this — do either of you understand how this code works? It appears to be sensitive to the presence of the |
Signed-off-by: Dan Selman <danscode@selman.org>
Pushed a fix to the problem breaking out of block quotes. The issue appears to be that after we insert a linebreak we get text nodes that don't have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the escaping block quote issue! Looks like we need to also fix the issue Michael mentioned. I can reproduce getting this error in the Contract Editor component when hitting shift+enter
:
Cannot read property 'src' of undefined
I think it is specific to this PR as I can only reproduce it in the netlify for this PR. @Michael-Grover, what did you mean by |
I can reproduce it by pressing shift+enter in other places, not just directly before the Smart Clause. The error appears to only happen in this PR. I tried it in https://ap-web-components.netlify.app/?path=/story/contract-editor--contract-editor and did not encounter the error. |
Copy/paste support for line breaks requires merging this PR and releasing |
…ntract Editor code more defensive Signed-off-by: Diana Lease <dianarlease@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Dan Selman danscode@selman.org
Closes #153
Also: #182
Also: #49
Also: #41
Changes
Flags
Screenshots or Video
https://www.loom.com/share/a1458a6fece0468088e2fef776e99d8f