Documention
Configuration
Page

Page Configuration

This section is used to configure the display and behavior of the Umo Editor page area.

Default Configuration

{
  page: {
    defaultMargin: {
      left: 3.18,
      right: 3.18,
      top: 2.54,
      bottom: 2.54,
    },
    defaultOrientation: 'landscape',
    defaultBackground: '#fff',
    watermark: {
      type: 'compact',
      alpha: 0.2,
      fontColor: '#000',
      fontSize: 16,
      fontFamily: 'SimSun',
      fontWeight: 'normal',
      text: '',
    },
  },
}

Configuration Item Descriptions

page.defaultMargin

Description: Default page margins, which users can modify, measured in centimeters (cm). You can dynamically modify the page margins using the setPage.

Type: Object

Default: { left: 3.18, right: 3.18, top: 2.54, bottom: 2.54 }

page.defaultOrientation

Description: Default page orientation, which users can modify. You can dynamically modify the page orientation using the setPage.

Type: String

Default: horizontal (prior to version 2.0.0, the default was landscape).

Options: 'landscape' and 'portrait' (prior to version 2.0.0, the options were horizontal and vertical).

page.defaultBackground

Description: Default page background color, which users can modify. You can dynamically modify the page background color using the setPage.

Type: String

Default: #fff

Options: Valid CSS color values.

page.watermark

Description: Default watermark settings, which users can modify. You can dynamically set or modify the page watermark using the setWatermark.

Type: Object

Configuration Items:

  • type: String, the type of watermark, with options compact and spacious.
  • alpha: Number, the transparency of the watermark, with values ranging from 0 to 1.
  • fontColor: String, the font color, with valid CSS color values.
  • fontSize: Number, the font size in pixels (px).
  • fontFamily: String, the font family, with valid CSS font-family values.
  • fontWeight: String, the font weight, with options normal, bold, and bolder.
  • text: String, the watermark text, recommended to be no more than 30 characters.