forgejo/modules
Giteabot f8a40dafb9
Allow <video> in MarkDown (#22892) (#23236)
Backport #22892

As you can imagine, for the Blender development process it is rather
nice to be able to include videos in issues, pull requests, etc.

This PR allows the `<video>` HTML tag to be used in MarkDown, with the
`src`, `autoplay`, and `controls` attributes.

## Help Needed

To have this fully functional, personally I feel the following things
are still missing, and would appreciate some help from the Gitea team.

### Styling

Some CSS is needed, but I couldn't figure out which of the LESS files
would work. I tried `web_src/less/markup/content.less` and
`web_src/less/_base.less`, but after running `make` the changes weren't
seen in the frontend.

This I would consider a minimal set of CSS rules to be applied:

```css
video {
  max-width: 100%;
  max-height: 100vh;
}
```

### Default Attributes

It would be fantastic if Gitea could add some default attributes to the
`<video>` tag. Basically `controls` should always be there, as there is
no point in disallowing scrolling through videos, looping them, etc.

### Integration with the attachments system

Another thing that could be added, but probably should be done in a
separate PR, is the integration with the attachments system. Dragging in
a video should attach it, then generate the appropriate MarkDown/HTML.

Co-authored-by: Sybren <122987084+drsybren@users.noreply.github.com>
2023-03-02 11:49:05 -05:00
..
actions
activitypub
analyze
auth Make CI use a dummy password hasher for all tests (#22983) 2023-02-20 13:20:30 +08:00
avatar
base
cache Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
charset
container
context Render access log template as text instead of HTML (#23013) 2023-02-21 10:22:13 +08:00
csv
doctor Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
emoji
eventsource
generate
git Pass --global when calling git config --get, for consistency with git config --set (#23157) (#23199) 2023-02-28 17:53:15 -05:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful
hcaptcha
highlight Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
hostmatcher
html
httpcache
httplib
indexer Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
issue/template
json
label Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
lfs escape filename when assemble URL (#22850) 2023-02-12 09:31:14 +08:00
log
markup Allow <video> in MarkDown (#22892) (#23236) 2023-03-02 11:49:05 -05:00
mcaptcha
metrics
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql
notification
options Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
packages
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
secret
session
setting Add InsecureSkipVerify to Minio Client for Storage (#23166) (#23177) 2023-02-28 00:29:17 +02:00
sitemap
ssh
storage Add InsecureSkipVerify to Minio Client for Storage (#23166) (#23177) 2023-02-28 00:29:17 +02:00
structs Add scopes to API to create token and display them (#22989) 2023-02-20 15:28:44 -06:00
svg
sync
system
templates Avoid warning for system setting when start up (#23054) (#23116) 2023-02-24 16:46:11 -05:00
test Rename repo.GetOwner to repo.LoadOwner (#22967) 2023-02-18 20:11:03 +08:00
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util Move IsReadmeFile* from modules/markup/ to modules/util (#22877) 2023-02-13 15:01:09 -05:00
validation
watcher
web
webhook