Skip to content

Commit

Permalink
fix: content in editor doesn't show up in latest Strapi version (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinmuenster committed Jul 11, 2024
1 parent 81c258a commit bb9892e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function RichText({
} else {
return "";
}
}, []);
}, [value]);

const handleChange = useCallback(
(value: string) => {
Expand All @@ -84,12 +84,14 @@ export default function RichText({
{formatMessage(intlLabel)}
</FieldLabel>
</Box>
<Editor
initialContent={content}
onChange={handleChange}
placeholder={placeholder}
disabled={disabled}
/>
{content && (
<Editor
initialContent={content}
onChange={handleChange}
placeholder={placeholder}
disabled={disabled}
/>
)}
{error && (
<Typography variant="pi" textColor="danger600">
{formatMessage({ id: error, defaultMessage: error })}
Expand Down

0 comments on commit bb9892e

Please sign in to comment.