Skip to content

Conversation

@westonruter
Copy link
Owner

Fixes #228
Fixes #229

  • Changing the font-size in Gutenberg 9.5 will now ensure that any highlighted lines will maintain their position.
  • When in Gutenberg 9.2+, the lines of text are now added to the overlay without escaping since a RichText component is used instead of PlainText. Line wrapping (or no-wrapping) is also now applies as expected. This was missed in a previous PR.

👎 Before, upon changing the font size to small or large:

image
image

👍 After:

image
image

@westonruter westonruter requested a review from allejo December 3, 2020 05:43
Comment on lines +282 to +283
// Copy the styles to ensure that the code-block-overlay is updated when the font size is changed in Gutenberg 9.5+.
textAreaProps.style = blockProps.style;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is what I was missing!! I was exploring to see how Gutenberg had changed but didn't think to copy over the styles. I love it 👍

@westonruter westonruter merged commit 82fbdf8 into develop Dec 3, 2020
@westonruter westonruter deleted the fix/font-size branch December 3, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrap lines no longer respected visually Gutenberg 9.5 Font size setting in Gutenberg 9.5 not supported in editor

3 participants