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

fix: inline codes now exitable with right arrow key and inclusive #3446

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

Palanikannan1437
Copy link
Collaborator

@Palanikannan1437 Palanikannan1437 commented Jan 23, 2024

Description

Inline code blocks are now exitable with the right arrow key and inclusive at the same time.

Key behaviours

  1. Only recognises inline code blocks if typed in the format left prefix (backtick)--> inline code text --> right prefix(backtick), this is the intended behaviour incase as explained in fix: inline code blocks, code blocks and links have saner behaviour #3318
  2. Inline code blocks can be triggered by using the bubble menu on selecting text (regression) in Rich text editors.
  3. To exit a code block, use the right arrow key and to get inside and start typing again use the left arrow key (backspace won't work as it's intended)
  4. Added a behaviour in which-->
    1. If you select any amounts of text and then click on the button for toggling code, then it'll make it inline code.
    2. If your cursor is just at some node and you click on button for toggling code then it'll make it a code block and if you click on it again it'll simply turn it into a paragraph node.
    3. If you select text inside a code block, then click on button for toggling code, it'll simply turn it into a paragraph node.

Demo

  1. For code blocks exiting
inline-code-exitable.mp4
  1. For toggling code block in pages, issues and comments
toggle.code.mp4

@Palanikannan1437 Palanikannan1437 self-assigned this Jan 23, 2024
@Palanikannan1437 Palanikannan1437 added the 🐛bug Something isn't working label Jan 23, 2024
@Palanikannan1437 Palanikannan1437 marked this pull request as ready for review January 24, 2024 07:55
@sriramveeraghanta sriramveeraghanta merged commit e23e4bc into develop Jan 24, 2024
6 of 8 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix/inline-code-block branch January 24, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working ✍️editor 🌟enhancement New feature or request ✨feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants