MCPcopy Create free account
hub / github.com/GrapesJS/react / CustomEditor

Function CustomEditor

packages/grapesjs-react-app-19/src/examples/CustomEditor.tsx:9–35  ·  view source on GitHub ↗
(props: Partial<EditorProps>)

Source from the content-addressed store, hash-verified

7import Topbar from './components/Topbar';
8
9export default function CustomEditor(props: Partial<EditorProps>) {
10 return (
11 <ThemeProvider theme={customTheme}>
12 <GrapesJsEditor className="gjs-custom-editor" {...defaultEditorProps} {...props}>
13 <div className={`flex h-full border-t ${MAIN_BORDER_COLOR}`}>
14 <div className="gjs-column-m flex flex-col flex-grow">
15 <Topbar className="min-h-[48px]" />
16 <Canvas className="flex-grow gjs-custom-editor-canvas" />
17 </div>
18 <RightSidebar className={`gjs-column-r w-[300px] border-l ${MAIN_BORDER_COLOR}`} />
19 </div>
20 <ModalProvider>
21 {({ open, title, content, close }) => (
22 <CustomModal open={open} title={<>{title}</>} children={<>{content}</>} close={close} />
23 )}
24 </ModalProvider>
25 <AssetsProvider>
26 {({ assets, select, close, Container }) => (
27 <Container>
28 <CustomAssetManager assets={assets} select={select} close={close} />
29 </Container>
30 )}
31 </AssetsProvider>
32 </GrapesJsEditor>
33 </ThemeProvider>
34 );
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected