mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-21 02:14:09 +02:00
spoiler fallback to uploaded media
This commit is contained in:
parent
4f83cc1c24
commit
6260871a21
|
|
@ -22,8 +22,9 @@ the spoiler by setting the attribute string. It could be rendered, for example,
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The plain-text fallback could be rendered as `(Spoiler: <content>)` and
|
To preserve the semantics of a spoiler in the plaintext fallback it is recommended to upload the contents of the spoiler
|
||||||
`(Spoiler for <reason>: <content>)` respectively.
|
as a text file and then link this: `[Spoiler](mxc://someserver/somefile)` and
|
||||||
|
`[Spoiler for reason](mxc://someserver/somefile)` respectively.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
Without reason:
|
Without reason:
|
||||||
|
|
@ -32,7 +33,7 @@ Without reason:
|
||||||
"msgtype": "m.text",
|
"msgtype": "m.text",
|
||||||
"format": "org.matrix.custom.html",
|
"format": "org.matrix.custom.html",
|
||||||
"body": "Hello there, the movie was (Spoiler: awesome)",
|
"body": "Hello there, the movie was (Spoiler: awesome)",
|
||||||
"formatted_body": "Hello there, the movie was <span data-mx-spoiler>awesome</span>"
|
"formatted_body": "Hello there, the movie was [Spoiler](mxc://someserver/somefile)"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
With reason:
|
With reason:
|
||||||
|
|
@ -41,7 +42,7 @@ With reason:
|
||||||
"msgtype": "m.text",
|
"msgtype": "m.text",
|
||||||
"format": "org.matrix.custom.html",
|
"format": "org.matrix.custom.html",
|
||||||
"body": "Hey (Spoiler for movie: the movie was awesome)",
|
"body": "Hey (Spoiler for movie: the movie was awesome)",
|
||||||
"formatted_body": "Hey <span data-mx-spoiler="movie">the movie was awesome</span>"
|
"formatted_body": "Hey [Spoiler for movie](mxc://someserver/somefile)"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue