Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow <video> in MarkDown #22892

Merged
merged 1 commit into from
Mar 1, 2023

Commits on Feb 13, 2023

  1. Allow <video> in MarkDown

    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.
    
    To have this fully functional, personally I feel the following things
    are still missing, and would appreciate some help from the Gitea team.
    
    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;
    }
    ```
    
    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.
    
    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.
    drsybren committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    1e80949 View commit details
    Browse the repository at this point in the history