mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-12 07:30:46 +02:00
[cm6] Move figure paste handler to core LaTeX extensions (#14957)
GitOrigin-RevId: 2dd6b036c5e9122a7e7564d4246f10444ba593e3
This commit is contained in:
@@ -202,6 +202,9 @@ export const figureModalPasteHandler = (): Extension => {
|
||||
if (!evt.clipboardData || evt.clipboardData.files.length === 0) {
|
||||
return
|
||||
}
|
||||
if (evt.clipboardData.types.includes('text/plain')) {
|
||||
return // allow pasted text to be handled even if there's also a file on the clipboard
|
||||
}
|
||||
const file = evt.clipboardData.files[0]
|
||||
if (!ALLOWED_MIME_TYPES.has(file.type)) {
|
||||
return
|
||||
|
||||
@@ -19,7 +19,6 @@ import { restoreScrollPosition } from '../scroll-position'
|
||||
import { CurrentDoc } from '../../../../../../types/current-doc'
|
||||
import isValidTeXFile from '../../../../main/is-valid-tex-file'
|
||||
import { listItemMarker } from './list-item-marker'
|
||||
import { figureModalPasteHandler } from '../figure-modal'
|
||||
import { isSplitTestEnabled } from '../../../../utils/splitTestUtils'
|
||||
import { toolbarPanel } from '../toolbar/toolbar-panel'
|
||||
import { selectDecoratedArgument } from './select-decorated-argument'
|
||||
@@ -204,7 +203,6 @@ const extension = (options: Options) => [
|
||||
isSplitTestEnabled('source-editor-toolbar') ? [] : toolbarPanel(),
|
||||
selectDecoratedArgument,
|
||||
showContentWhenParsed,
|
||||
figureModalPasteHandler(),
|
||||
isSplitTestEnabled('paste-html') ? pasteHtml : [],
|
||||
isSplitTestEnabled('table-generator') ? tableGeneratorTheme : [],
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user