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';
7
7
import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
8
8
import { svg } from '../svg.js' ;
9
9
import { hideElem , showElem , toggleElem } from '../utils/dom.js' ;
10
+ import { htmlEscape } from 'escape-goat' ;
10
11
11
12
const { appUrl, csrfToken} = window . config ;
12
13
@@ -168,6 +169,8 @@ export function initGlobalDropzone() {
168
169
let fileMarkdown = `[${ file . name } ](/attachments/${ file . uuid } )` ;
169
170
if ( file . type . startsWith ( 'image/' ) ) {
170
171
fileMarkdown = `!${ fileMarkdown } ` ;
172
+ } else if ( file . type . startsWith ( 'video/' ) ) {
173
+ fileMarkdown = `<video src="/attachments/${ file . uuid } " title="${ htmlEscape ( file . name ) } " controls></video>` ;
171
174
}
172
175
navigator . clipboard . writeText ( fileMarkdown ) ;
173
176
} ) ;
You can’t perform that action at this time.
0 commit comments