Skip to content

Options configurable in Topol Options

Topol options are used to set features which topol provides.

ts
export default interface IPluginOptions {
  authorize: {
    apiKey: string;
    userId: string | number;
  };
  title?: string;
  removeTopBar?: boolean;
  topBarOptions?: Array<string>;
  windowBar?: Array<string>;
  mainMenuAlign?: "left" | "right";
  disableAlerts?: boolean;
  customFileManager?: boolean;
  language?: string;
  light?: boolean;
  theme?: ITheme;
  hideSettingsTab?: boolean;
  imageEditor?: boolean;
  premadeBlocks?: Object | boolean;
  savedBlocks?: Array<ISavedBlock> | boolean;
  mergeTags?: Array<IMergeTagGroup>;
  enableAutosaves?: boolean;
  htmlMinified?: boolean;
  apiAuthorizationHeader?: IAuthHeaderConfig | string;
  contentBlocks?: IContentBlockOptions[];
  callbacks: {
    onSave?(json: JSON, html: HTMLDocument): void;
    onSaveAndClose?(json: JSON, html: HTMLDocument): void;
    onTestSend?(email: string, json: JSON, html: HTMLDocument): void;
    onOpenFileManager?(): void;
    onLoaded?(): void;
    onBlockSave?(block: ISavedBlock): void;
    onBlockRemove?(blockId: Number): void;
    onBlockEdit?(blockId: Number): void;
    onInit?(): void;
    onUndoChange?(count: Number): void;
    onRedoChange?(count: Number): void;
    onPreview?(html: HTMLDocument): void;
    onAlert?(notification: INotification): void;
  };
  api?: IAPI;
  mobileFirstEnabled?: boolean;
  customFonts?: {
    override?: boolean;
    fonts: Array<IFont>;
  };
  tinyConfig?: unknown;
  fontSizes?: Array<number>;

  colors?: Array<string>;

  //Hidden from user
  ecm?: {
    dataFeeds?: string;
  };
  googleApiKey?: string;
  role?: "manager" | "editor" | "reader";
}