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

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 Fix actions workflow branches match bug () 2023-02-02 20:40:08 +08:00
activitypub Add Chef package registry () 2023-02-06 09:49:21 +08:00
analyze Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
auth Make CI use a dummy password hasher for all tests () 2023-02-20 13:20:30 +08:00
avatar Unify hashing for avatar () 2023-01-02 22:46:39 +01:00
base Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
cache Add context cache as a request level cache () 2023-02-15 21:37:34 +08:00
charset Fix isAllowed of escapeStreamer () 2023-02-09 20:51:36 +08:00
container Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
context Render access log template as text instead of HTML () 2023-02-21 10:22:13 +08:00
csv Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
doctor Refactor the setting to make unit test easier () 2023-02-20 00:12:01 +08:00
emoji Fix unstable emoji sort () 2023-01-05 13:58:51 +02:00
eventsource Move convert package to services () 2022-12-29 10:57:15 +08:00
generate Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
git Pass --global when calling git config --get, for consistency with git config --set () () 2023-02-28 17:53:15 -05:00
gitgraph Add context cache as a request level cache () 2023-02-15 21:37:34 +08:00
graceful Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
hcaptcha Consume hcaptcha and pwn deps () 2023-01-29 09:49:51 -06:00
highlight Refactor the setting to make unit test easier () 2023-02-20 00:12:01 +08:00
hostmatcher Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
html Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
httpcache Add some comments for recent code () 2023-02-02 11:39:38 -06:00
httplib Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
indexer Refactor the setting to make unit test easier () 2023-02-20 00:12:01 +08:00
issue/template Allow issue templates to not render title () 2023-01-26 22:45:49 -06:00
json Update gitea-vet to check FSFE REUSE () 2022-12-02 22:14:57 +08:00
label Add loading yaml label template files () () 2023-03-01 21:57:34 -05:00
lfs escape filename when assemble URL () 2023-02-12 09:31:14 +08:00
log Improve trace logging for pulls and processes () 2023-02-03 18:11:48 -05:00
markup Allow <video> in MarkDown () () 2023-03-02 11:49:05 -05:00
mcaptcha Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
metrics include build info in Prometheus metrics () 2023-02-08 19:54:01 +02:00
migration Scoped labels () 2023-02-18 21:17:39 +02:00
mirror Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
nosql Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
notification Implement actions () 2023-01-31 09:45:19 +08:00
options Add loading yaml label template files () () 2023-03-01 21:57:34 -05:00
packages Use import of OCI structs () 2023-02-06 10:07:09 +00:00
paginator Update gitea-vet to check FSFE REUSE () 2022-12-02 22:14:57 +08:00
pprof Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
private Implement actions () 2023-01-31 09:45:19 +08:00
process Improve trace logging for pulls and processes () 2023-02-03 18:11:48 -05:00
proxy Use proxy for pull mirror () 2023-02-11 08:39:50 +08:00
proxyprotocol Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
public Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
queue Correctly handle select on multiple channels in Queues () 2022-12-30 02:06:47 +02:00
recaptcha Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
references Use correct captured group range when parsing cross-reference () 2023-01-31 10:08:05 +01:00
regexplru Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
repository Add loading yaml label template files () () 2023-03-01 21:57:34 -05:00
secret Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
session Update gitea-vet to check FSFE REUSE () 2022-12-02 22:14:57 +08:00
setting Add InsecureSkipVerify to Minio Client for Storage () () 2023-02-28 00:29:17 +02:00
sitemap Fix sitemap () 2022-12-30 23:31:00 +08:00
ssh Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
storage Add InsecureSkipVerify to Minio Client for Storage () () 2023-02-28 00:29:17 +02:00
structs Add scopes to API to create token and display them () 2023-02-20 15:28:44 -06:00
svg Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
sync Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
system Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
templates Avoid warning for system setting when start up () () 2023-02-24 16:46:11 -05:00
test Rename repo.GetOwner to repo.LoadOwner () 2023-02-18 20:11:03 +08:00
timeutil Check for zero time instant in TimeStamp.IsZero() () 2022-12-20 10:04:55 +08:00
translation Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
turnstile Add new captcha: cloudflare turnstile () 2023-02-05 15:29:03 +08:00
typesniffer Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
updatechecker Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
upload Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
uri Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
user Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
util Move IsReadmeFile* from modules/markup/ to modules/util () 2023-02-13 15:01:09 -05:00
validation Map OIDC groups to Orgs/Teams () 2023-02-08 14:44:42 +08:00
watcher Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
web Map OIDC groups to Orgs/Teams () 2023-02-08 14:44:42 +08:00
webhook Restructure webhook module () 2023-01-01 23:23:15 +08:00