Skip to content
Open in

Editor Layout & UI Visibility ​

These options trim the editor's chrome to fit your product: panels can start collapsed, individual top-bar controls can be hidden, the top bar can go entirely, and a window bar with fullscreen, close, and rename controls can be added. All of them are optional and combine freely within the configuration.

hideSelectionPanel ​

The hideSelectionPanel option (boolean, default false) collapses the right-side selection panel, the panel that shows the properties of the currently selected element. The left panel with elements, layers, and settings is not affected by this option.

typescript
{
  hideSelectionPanel: true
}

With it set, the panel starts collapsed and the canvas takes the extra width. Selecting an element opens it again on screens 1024 pixels and wider, and so does the arrow control on the panel edge (unless that control is removed via hideSelectionPanelExpand). The panel can also be toggled at runtime from your application:

js
LPE.toggleSelectionPanel();

hideSelectionPanelExpand ​

The hideSelectionPanelExpand option (boolean, default false) removes the collapse/expand arrow on the selection panel:

typescript
{
  hideSelectionPanelExpand: true
}

Without the arrow, users cannot collapse the selection panel or reopen it once collapsed, and selecting an element does not reopen it either. Its visibility is fixed to whatever hideSelectionPanel says (though your application can still call LPE.toggleSelectionPanel()). On screens narrower than 1024 pixels the arrow is always shown, whatever hideSelectionPanelExpand says, because the panel covers the canvas there.

startWithOpenElementsPanel ​

The startWithOpenElementsPanel option (boolean, default false) opens the elements panel when the editor first loads. With the start screen shown, the panel opens once the user picks a template or starts from scratch.

typescript
{
  startWithOpenElementsPanel: true
}

The panel stays closed on touch devices and on screens narrower than 1024 pixels, where it would cover the canvas.

While the start screen with premade templates is shown, the Preview button and the selection panel stay hidden, and the elements button is turned off. They come back once the user picks a template or starts from scratch.

Phones and tablets ​

On screens narrower than 1024 pixels:

  • The left panel and the selection panel open over the canvas instead of next to it. Tapping the canvas closes them.
  • The selection panel starts collapsed. Selecting an element doesn't open it, so it doesn't cover what was just tapped.
  • The selection panel's arrow is always shown, whatever hideSelectionPanelExpand says.
  • The top bar scrolls sideways when its buttons don't fit.

On touch devices, the Add element button is hidden and elements can't be dragged onto the canvas. A notice titled "Optimized for desktop" says that some features are simplified on the device.

The Add element button is also hidden on any screen narrower than 768 pixels, whatever the input device.

hideSettingsTab ​

The hideSettingsTab option (boolean, default false) removes the Settings tab from the editor interface, so users cannot access template-level settings from within the editor:

typescript
{
  hideSettingsTab: true
}

removeTopBar ​

The removeTopBar option (boolean, default false) removes the entire top bar for a minimal interface:

typescript
{
  removeTopBar: true
}

This removes built-in access to actions like save, preview, and undo/redo, so the host application is expected to provide replacements, for example custom buttons wired to instance methods like LPE.save() and LPE.togglePreview().

hideTopbarControls ​

The hideTopbarControls option (string[], optional) hides specific top-bar controls while keeping the rest visible:

typescript
{
  hideTopbarControls: ["undoRedo", "changePreview"]
}

The valid control identifiers:

  • "undoRedo": undo and redo buttons (a single toggle; they cannot be hidden separately)
  • "changePreview": preview enter/exit toggle
  • "previewSize": device-size selector
  • "save": Save button
  • "saveAndClose": Save & Close button
  • "translate": the Translate button (pages without languages, see AI features)
  • "changeLanguage": the language dropdown of a multilingual page

Unrecognized identifiers are silently ignored, so double-check the spelling against this list. Passing [] hides nothing; use removeTopBar: true to remove the whole bar.

saveAndCloseButton ​

The saveAndCloseButton option ("dropdown" | "separate", default "dropdown") controls how Save and Save & Close are laid out when both are visible. By default Save & Close sits in the … menu of the Save button; "separate" renders the two as standalone buttons side by side:

typescript
{
  saveAndCloseButton: "separate"
}

The option is ignored when either button is hidden via hideTopbarControls.

windowBar ​

The windowBar option (string[], optional) shows a window bar with the listed controls, commonly used in embedded integrations where window controls should match the host application's UI:

typescript
{
  windowBar: ["fullscreen", "close"]
}

The available controls are "fullscreen" (fullscreen toggle) and "close" (close button). When windowBar is not set, the window bar is hidden entirely, unless renameTemplate is true, which forces the bar to appear so the rename control has somewhere to live.

renameTemplate ​

The renameTemplate option (boolean, default false) shows a rename button next to the template title in the window bar. Renaming is delegated to your application: implement the onTemplateRename(name) callback to receive the new name, then call LPE.setTemplateName(newName) to update the displayed title.

Set the title option as well; when it is unset, the bar shows the editor's built-in default title instead of your template's name.

js
const LPE = LandingPageEditor({
  config: {
    ...TOPOL_OPTIONS,
    title: "Spring Campaign",
    renameTemplate: true,
  },
  onTemplateRename: ({ name }) => {
    // persist the name in your app, then reflect it in the editor
    LPE.setTemplateName(name);
  },
});

showUnsavedDialogBeforeExit ​

The showUnsavedDialogBeforeExit option (boolean, default true) warns users before exiting with unsaved changes:

typescript
{
  showUnsavedDialogBeforeExit: false
}

Disabling the dialog lets users exit without a prompt, which risks lost work. Only disable it when another save or autosave mechanism is in place.