Skip to content
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

Code block constraint and normalization #85

Closed
Tracked by #123
cloverich opened this issue Oct 19, 2021 · 3 comments · Fixed by #197 or #200
Closed
Tracked by #123

Code block constraint and normalization #85

cloverich opened this issue Oct 19, 2021 · 3 comments · Fixed by #197 or #200

Comments

@cloverich
Copy link
Owner

cloverich commented Oct 19, 2021

  • When selecting text across multiple paragraphs, converting to code block converts it into multiple code blocks. Notion also does this and it drives me insane. This is likely a fix that can be done in plate. update: Moving this to a separate issue as it affects more than code blocks
  • Prevent nested code blocks. I think this is also reported in plate

Screen Shot 2021-10-15 at 3 40 37 PM

@cloverich
Copy link
Owner Author

Original description is only partially accurate as the libraries were upgraded and re-set. See linked issues and especially #176 for more context.

@cloverich
Copy link
Owner Author

There's a bug where the initial code_block values aren't normalized correctly, and modifying the text will crash the editor; reloading the page fixes so the slate->mdast->slate transformation fixes. Probably how the code lines are generated.

@cloverich cloverich reopened this Jun 26, 2024
@cloverich
Copy link
Owner Author

Also, the code_block width growing too large causes the parent application window to gain an x-scroll; instead it should have its max-width to the editor and itself handle scrolling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant