..
This commit is contained in:
parent
8106bae0c2
commit
217c027044
|
@ -16,7 +16,7 @@ import { useSnackbar } from '~/context/ui'
|
|||
import { Author } from '~/graphql/schema/core.gen'
|
||||
import { base, custom, extended } from '~/lib/editorExtensions'
|
||||
import { handleImageUpload } from '~/lib/handleImageUpload'
|
||||
import { renderUploadedImage } from '../Upload/renderUploadedImage'
|
||||
import { allowedImageTypes, renderUploadedImage } from '../Upload/renderUploadedImage'
|
||||
import { BlockquoteBubbleMenu } from './Toolbar/BlockquoteBubbleMenu'
|
||||
import { EditorFloatingMenu } from './Toolbar/EditorFloatingMenu'
|
||||
import { FigureBubbleMenu } from './Toolbar/FigureBubbleMenu'
|
||||
|
@ -32,17 +32,6 @@ export type EditorComponentProps = {
|
|||
disableCollaboration?: boolean
|
||||
}
|
||||
|
||||
const allowedImageTypes = new Set([
|
||||
'image/bmp',
|
||||
'image/gif',
|
||||
'image/jpeg',
|
||||
'image/jpg',
|
||||
'image/png',
|
||||
'image/tiff',
|
||||
'image/webp',
|
||||
'image/x-icon'
|
||||
])
|
||||
|
||||
const yDocs: Record<string, Doc> = {}
|
||||
const providers: Record<string, HocuspocusProvider> = {}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ export const MicroEditor = (props: MicroEditorProps): JSX.Element => {
|
|||
],
|
||||
editorProps: {
|
||||
attributes: {
|
||||
class: styles.simplifiedEditorField
|
||||
class: styles.compactEditor
|
||||
}
|
||||
},
|
||||
content: props.content || '',
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
padding: 16px 16px 8px;
|
||||
position: relative;
|
||||
|
||||
.simplifiedEditorField {
|
||||
.compactEditor {
|
||||
@include font-size(1.4rem);
|
||||
|
||||
min-height: 100px;
|
||||
|
@ -25,7 +25,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
&.smallHeight .simplifiedEditorField {
|
||||
&.smallHeight .compactEditor {
|
||||
min-height: 34px;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ export default function MiniEditor(props: MiniEditorProps): JSX.Element {
|
|||
],
|
||||
editorProps: {
|
||||
attributes: {
|
||||
class: styles.simplifiedEditorField
|
||||
class: styles.compactEditor
|
||||
}
|
||||
},
|
||||
content: props.content || '',
|
||||
|
|
|
@ -20,3 +20,14 @@ export const renderUploadedImage = (editor: Editor, image: { url: string; origin
|
|||
})
|
||||
.run()
|
||||
}
|
||||
|
||||
export const allowedImageTypes = new Set([
|
||||
'image/bmp',
|
||||
'image/gif',
|
||||
'image/jpeg',
|
||||
'image/jpg',
|
||||
'image/png',
|
||||
'image/tiff',
|
||||
'image/webp',
|
||||
'image/x-icon'
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue
Block a user