This repository has been archived by the owner on Feb 7, 2025. It is now read-only.
fix(ui-markdown-editor): styleblock refresh - #276 #283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: d-e-v-esh 59534570+d-e-v-esh@users.noreply.github.com
Closes #276
Before this, the styles block would not refresh when we changed the cursor position. It would only refresh when we started writing. Now the styles block gets updated when the cursor position changes.
Changes
currentStyle
value gets initiated inuseState
hook. ThatcurrentStyle
now gets updated inside theonChange
function which makes this work.currentStyle
value gets passed down to theStyleDropdown
menu through props.Flags
Heading 4
,Heading 5
, andHeading 6
as they are not yet decided upon but would work normally if they are included later in the future. But the empty bar would be replaced with"Style"
for now.Screenshots or Video
Related Issues
Author Checklist
--signoff
option of git commit.master
fromfork:branchname