-
DescriptionI built a custom element and after updating to latest plate/slate, rendering the tag fails with:
Not sure on what changed, or what I initially got away with. Reproduction URLNo response Reproduction stepsCode:
import {
createPlatePlugin,
PlateElement,
useElement,
withRef,
} from "@udecode/plate/react"
const WiTagElement = withRef<
typeof PlateElement,
{
onClick?: (mentionNode: any) => void
}
>(({ children, className, prefix, onClick, ...props }, ref) => {
const element = useElement<WiTagElementT>()
...
return (
<PlateElement
...
}
...
createPlatePlugin({
key: WiTagPlugin,
node: {
isElement: true,
isInline: true,
isVoid: true,
component: WiTagElement,
},
}), New error:
|
Beta Was this translation helpful? Give feedback.
Answered by
maxott
Nov 16, 2024
Replies: 2 comments 8 replies
-
Needs a reproduction. It's probably package versions not synced together |
Beta Was this translation helpful? Give feedback.
8 replies
-
As @zbeyens suggested, install the individual packages instead of @udecode/plate. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
maxott
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As @zbeyens suggested, install the individual packages instead of @udecode/plate.
A good starting point is the
package.json
file in https://github.com/udecode/plate-playground-template