diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index ab2f04f8..aaa721fe 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -546,6 +546,7 @@ export type Config = { types?: Record; disableCustomTemplates?: boolean; hideCloseButton?: boolean; + hideTopBar?: boolean; templates?: Template[]; tokens?: { [key in keyof ConfigTokens]?: Array>; diff --git a/packages/editor/src/Editor.tsx b/packages/editor/src/Editor.tsx index 8d34002a..fd1fbea3 100644 --- a/packages/editor/src/Editor.tsx +++ b/packages/editor/src/Editor.tsx @@ -1039,6 +1039,7 @@ const EditorContent = ({ }} hideCloseButton={props.config.hideCloseButton ?? false} readOnly={editorContext.readOnly} + hideTopBar={props.config.hideTopBar} /> void; hideCloseButton: boolean; readOnly: boolean; + hideTopBar?: boolean; }> = ({ onClose, onViewportChange, @@ -101,6 +102,7 @@ export const EditorTopBar: React.FC<{ onAdminModeChange, hideCloseButton, readOnly, + hideTopBar, }) => { const headingRef = useRef(null); @@ -108,6 +110,11 @@ export const EditorTopBar: React.FC<{ onAdminModeChange(true); }); + /* Dont render the top bar if hideTopBar is true */ + if (hideTopBar) { + return null; + } + return (