mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-28 11:48:36 +01:00
add rendering idea
This commit is contained in:
parent
ebb1351a9f
commit
6f3bcb56d3
|
|
@ -10,7 +10,9 @@ To render the spoiler the content is hidden and then revealed once interacted so
|
|||
## Proposal
|
||||
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. It could be rendered, for example, similar to this:
|
||||
|
||||

|
||||
|
||||
The plain-text fallback could be rendered as `(Spoiler: <content>)` and `(Spoiler for <reason>: <content>)` respectively.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue