diff --git a/packages/editor-sample/src/documents/editor/core.tsx b/packages/editor-sample/src/documents/editor/core.tsx index d63b0fb..dbb8075 100644 --- a/packages/editor-sample/src/documents/editor/core.tsx +++ b/packages/editor-sample/src/documents/editor/core.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { z } from 'zod'; -import { ImageOutlined } from '@mui/icons-material'; import { Avatar, AvatarProps, AvatarPropsSchema } from '@usewaypoint/block-avatar'; import { Button, ButtonProps, ButtonPropsSchema } from '@usewaypoint/block-button'; import { Divider, DividerProps, DividerPropsSchema } from '@usewaypoint/block-divider'; @@ -74,28 +73,16 @@ const EDITOR_DICTIONARY = { Image: { schema: ImagePropsSchema, Component: (data: ImageProps) => { - const url = data.props?.url ?? ''; - if (url.trim().length === 0) { - return ( - -
- -
-
- ); - } + const props = { + ...data, + props: { + ...data.props, + url: data.props?.url ?? 'https://placehold.co/600x400@2x/F8F8F8/CCC?text=Your%20image', + }, + }; return ( - + ); },