-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat(text-editor): replaces draftjs with lexical #7149
base: master
Are you sure you want to change the base?
Conversation
9b021b8
to
a5d0b45
Compare
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.
Really good stuff @damienrobson-sage, I really like the structure/approach you've adopted, I've left some comments but in general they're pretty trivial
src/components/rich-text-editor/plugins/Placeholder/placeholder.component.tsx
Outdated
Show resolved
Hide resolved
} | ||
|
||
/* istanbul ignore else */ | ||
if (resetOnCancel && value) { |
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.
comment (non-blocking): I'm wondering if we can avoid the additional prop here. If we move the code below into a useEffect
it would run when the value is reset by the onCancel
callback being run etc. If it doesn't work I'm fine with what you have already but do think it's worth exploring etc
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.
Good work with this. Just a few bugs I spotted when messing around with the new component.
Seems that the Bold and Italic options aren't selectable on initial render.
Screen.Recording.2025-01-13.at.10.58.19.mov
Bold and Italic cannot be used together.
Screen.Recording.2025-01-13.at.10.59.51.mov
If you select the bullet point list before typing, it doesn't apply the formatting to the text.
Screen.Recording.2025-01-13.at.11.02.24.mov
46ff8df
to
5defeb6
Compare
The draftjs package is no longer maintained; a decision has been reached to rewrite the TextEditor component using Lexical BREAKING CHANGE: Whilst the intention is to implement a straight-up replacement and maintain as much functionality as possible, there may be differences that customers need to be made aware of. These will be communicated separately as necessary.
d19610d
to
ae48e7e
Compare
The draftjs package is no longer maintained; a decision has been reached to rewrite the TextEditor component using Lexical
BREAKING CHANGE: Whilst the intention is to implement a straight-up replacement and maintain as much functionality as possible, there may be differences that customers need to be made aware of. These will be communicated separately as necessary.
Proposed behaviour
Rebuild the
TextEditor
component from the ground up using LexicalCurrent behaviour
The
TextEditor
component is built arounddraftjs
, which is no longer maintained.Checklist
d.ts
file added or updated if requiredQA
Testing instructions
Using the provided playground in Storybook's
Test
section will allow you to view and interact with the new editor in several states