Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Improve consistency of single line output from RTE #669

Closed
artcodespace opened this issue May 9, 2023 · 1 comment · Fixed by #834
Closed

Improve consistency of single line output from RTE #669

artcodespace opened this issue May 9, 2023 · 1 comment · Fixed by #834
Labels
A-Rich-Text-Editor Rust T-Enhancement Improvement or feature request

Comments

@artcodespace
Copy link
Contributor

When creating a message from scratch, typing the message "sample text" and sending the message will send a message with content sample text. However, if you insert a linebreak (shift + enter on mac, dependent on settings), then press backspace (to return to a single line) and then type a message "sample text", the message content will be <p>sample text</p>.

This will cause issues with commands (if a user has done anything spanning multiple lines then used deletion to return to a single line) as they depend on checking the beginning of the message to see if it contains special text.

Proposed solution:

  • When a user makes a change that moves from multiple paragraphs to a single paragraph, we should move the contents of that single paragraph to the root node and then remove the paragraph tag
@artcodespace
Copy link
Contributor Author

Relates to #704

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Rich-Text-Editor Rust T-Enhancement Improvement or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants