mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-24 01:58:36 +01:00
linebreak consistency
This commit is contained in:
parent
d750115fdc
commit
ebb1351a9f
|
|
@ -1,5 +1,6 @@
|
|||
# MSC 2010: Proposal to add client-side spoilers
|
||||
Sometimes, while you want to put text into a spoiler to not have people accidentally read things that they don't want to see.
|
||||
Sometimes, while you want to put text into a spoiler to not have people accidentally read things that they don't want to see.
|
||||
|
||||
For example, when discussing a new movie or a TV series, not everyone might have watched it yet. In such cases it would make sense to add a spoiler so that only those who have seen the movie or don't mind spoilers read the content.
|
||||
Another example would be e.g. in mental health communities where certain people have certain triggers. People could put talking about abuse or thelike into a spoiler, to not accidentally trigger anyone just reading along the conversation.
|
||||
Furthermore this is helpful for bridging to other networks that already have a spoiler feature.
|
||||
|
|
@ -7,7 +8,8 @@ Furthermore this is helpful for bridging to other networks that already have a s
|
|||
To render the spoiler the content is hidden and then revealed once interacted somehow (e.g. a click / hover).
|
||||
|
||||
## Proposal
|
||||
This proposal is about adding a new attribute to the `formatted_body` of messages with type `m.room.message` and msgtype `m.text`.
|
||||
This proposal is about adding a new attribute to the `formatted_body` of messages with type `m.room.message` and msgtype `m.text`.
|
||||
|
||||
It adds a new attribute, `data-mx-spoiler`, to the `<span>` tag. If the attribute is present the contents of the span tag should be rendered as a spoiler. Optionally, you can specify a reason for the spoiler by setting the attribute string.
|
||||
|
||||
The plain-text fallback could be rendered as `(Spoiler: <content>)` and `(Spoiler for <reason>: <content>)` respectively.
|
||||
|
|
|
|||
Loading…
Reference in a new issue