-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComponents.tsx
38 lines (34 loc) · 1014 Bytes
/
Components.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* eslint-disable @typescript-eslint/no-explicit-any */
import { createPlateUI, withProps } from '@udecode/plate'
import { StyledElement } from '@udecode/plate-styled-components'
import { MediaEmbedElement, TableWrapper, LinkElement } from '@mexit/shared'
import TagElement from '../../Editor/components/Tags/TagElement'
import QuickLinkElement from '../../Editor/plugins/QuickLink/components/QuickLinkElement'
import {
ELEMENT_ILINK,
ELEMENT_LINK,
ELEMENT_MEDIA_EMBED,
ELEMENT_PARAGRAPH,
ELEMENT_TABLE,
ELEMENT_TAG
} from '@mexit/core'
export const components = {
[ELEMENT_LINK]: withProps(LinkElement, {
as: 'a'
}),
[ELEMENT_PARAGRAPH]: withProps(StyledElement, {
styles: {
root: {
margin: '0.1em 0 0'
}
}
}),
[ELEMENT_TAG]: TagElement,
[ELEMENT_ILINK]: QuickLinkElement,
[ELEMENT_MEDIA_EMBED]: MediaEmbedElement,
[ELEMENT_TABLE]: TableWrapper
}
// const components = createPlateUI({
// ...editorPreviewComponents
// })
export default components