This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
Use of <p>
to represent line breaks in message output
#832
Labels
Problem
When a user types multiple lines of text in the editor, it is represented as multiple HTML paragraphs in the message output.
The default and correct way to display an HTML paragraph is to add a significant padding to visually separate it from the surrounding elements. Hence it's reasonable to expect that any client may render the message in this way. The problem is then that the user may compose a message that looks one way in the editor (compact spacing at line breaks) only for it to be displayed completely differently when rendered by a client.
Proposed solution
For context,
<p>
tags were only added to help manage the state of the editor internally but there shouldn't be any reason that this implementation detail needs to leak into the message output.Historically, some clients have adjusted the default style of paragraph tags to reduce the padding. However this shouldn't be necessary when we can use
<br>
tags to represent a line break as it appears in the editor.So my proposed solution would be to
The text was updated successfully, but these errors were encountered: