File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import {showGlobalErrorMessage} from '../bootstrap.js';
77import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
88import { svg } from '../svg.js' ;
99import { hideElem , showElem , toggleElem } from '../utils/dom.js' ;
10+ import { htmlEscape } from 'escape-goat' ;
1011
1112const { appUrl, csrfToken} = window . config ;
1213
@@ -168,6 +169,8 @@ export function initGlobalDropzone() {
168169 let fileMarkdown = `[${ file . name } ](/attachments/${ file . uuid } )` ;
169170 if ( file . type . startsWith ( 'image/' ) ) {
170171 fileMarkdown = `!${ fileMarkdown } ` ;
172+ } else if ( file . type . startsWith ( 'video/' ) ) {
173+ fileMarkdown = `<video src="/attachments/${ file . uuid } " title="${ htmlEscape ( file . name ) } " controls></video>` ;
171174 }
172175 navigator . clipboard . writeText ( fileMarkdown ) ;
173176 } ) ;
You can’t perform that action at this time.
0 commit comments