Closed arthureberledev closed 9 months ago
Hey I'll just move this to discussions. The library was also update with breaking change so now the Editor component looks like this
export type EditorContentProps = {
children: React.ReactNode;
className?: string;
initialContent?: JSONContent;
} & Omit<EditorProviderProps, "content">;
export const EditorContent = ({
className,
children,
initialContent,
...rest
}: EditorContentProps) => {
const extensions = useMemo(() => {
return [...simpleExtensions, ...(rest.extensions ?? [])];
}, [rest.extensions]);
return (
<div className={className}>
<EditorProvider {...rest} content={initialContent} extensions={extensions}>
{children}
</EditorProvider>
</div>
);
};
Hey,
so I've been trying to create an PR that extends the editor by allowing to pass a ref to it:
But ever since I've implemented this, i get an type error in my frontend when trying to import this new component:
I've already tried to update the
@types/react
dependency (btw. there are two of them), but this only leads to an type error in the library itself (with the same error message on the<EditorContent>
Component...)Can anyone help out with this error? Knows what could help?