Skip to content

Add a blank line after Code block in a chat #9169

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rostislavnagimov
Copy link
Contributor

The Issue:
When a code block was inserted into the chat, users were unable to create a new line or paragraph below it to continue typing. This made it difficult to compose the text directly after the code block.

Changes:
The text editor has been updated to automatically ensure an empty paragraph is present immediately after any inserted code block. This allows users to seamlessly click or navigate below the code block and continue typing.

@mr1name
Copy link
Member

mr1name commented Jun 4, 2025

If you press the down arrow at the end of a code block, the editor will create a new paragraph — so why do we need to create one manually? You’d still need to press the arrow key either way. In any case, this kind of enhancement should be handled at the cursor logic level, not at the content level. (Or at least for the editor in general, rather than for a specific block). Otherwise, we’d end up having to wrap every possible block with paragraphs.

Copy link

Connected to Huly®: UBERF-11426

@haiodo haiodo requested a review from mr1name June 5, 2025 06:35
@rostislavnagimov
Copy link
Contributor Author

If you press the down arrow at the end of a code block, the editor will create a new paragraph — so why do we need to create one manually? You’d still need to press the arrow key either way. In any case, this kind of enhancement should be handled at the cursor logic level, not at the content level. (Or at least for the editor in general, rather than for a specific block). Otherwise, we’d end up having to wrap every possible block with paragraphs.

From my understanding down key is not fully obvious in that case, so i think would be better to make it simple and usable with a cursor click

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 this pull request may close these issues.

2 participants