@@ -1,3 +1,4 @@
|
||||
import { LinkFloatingToolbar } from '@/features/blocks/bubbles/textBubble/components/plate/LinkFloatingInput'
|
||||
import {
|
||||
createBoldPlugin,
|
||||
createItalicPlugin,
|
||||
@@ -5,13 +6,13 @@ import {
|
||||
} from '@udecode/plate-basic-marks'
|
||||
import { createPlugins } from '@udecode/plate-core'
|
||||
import { createLinkPlugin, ELEMENT_LINK } from '@udecode/plate-link'
|
||||
import { PlateFloatingLink } from '@udecode/plate-ui-link'
|
||||
|
||||
export const editorStyle = (backgroundColor: string): React.CSSProperties => ({
|
||||
flex: 1,
|
||||
padding: '1rem',
|
||||
backgroundColor,
|
||||
borderRadius: '0.25rem',
|
||||
outline: 'none',
|
||||
})
|
||||
|
||||
export const platePlugins = createPlugins(
|
||||
@@ -20,7 +21,8 @@ export const platePlugins = createPlugins(
|
||||
createItalicPlugin(),
|
||||
createUnderlinePlugin(),
|
||||
createLinkPlugin({
|
||||
renderAfterEditable: PlateFloatingLink,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
renderAfterEditable: LinkFloatingToolbar as any,
|
||||
options: {
|
||||
isUrl: (url: string) =>
|
||||
url.startsWith('http:') ||
|
||||
|
||||
Reference in New Issue
Block a user