trying to upgrade plate to new version - createPlateUI function missing when #4014
milantomic6
started this conversation in
General
Replies: 1 comment 4 replies
-
Many ways you can choose:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
we are using very old version of plate framework (7.0.2) and we need to upgrade due to security issues (has to be v36.5.8 at least)
function "createPlateComponents" was renamed to createPlateUI and then eventualy removed in version 22.
what should I replace call to this function with? - it seems it creates map of components, from which we can fetch component by name, here is sample usage from our code:
const components = createPlateComponents();
export function renderLeaf(props: RenderLeafProps): JSX.Element | undefined {
const { leaf, children } = props;
let markFound = false;
Marks.forEach((mark) => {
if (leaf[mark]) {
markFound = true;
props.children = componentsmark!;
}
});
if (markFound) {
return <DefaultLeaf {...props} />;
}
return children;
}
Beta Was this translation helpful? Give feedback.
All reactions