mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-30 19:13:42 +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
|
# 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.
|
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.
|
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.
|
Furthermore this is helpful for bridging to other networks that already have a spoiler feature.
|
||||||
|
|
@ -8,6 +9,7 @@ To render the spoiler the content is hidden and then revealed once interacted so
|
||||||
|
|
||||||
## Proposal
|
## 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.
|
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.
|
The plain-text fallback could be rendered as `(Spoiler: <content>)` and `(Spoiler for <reason>: <content>)` respectively.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue