Body Values
You can programmatically set values for the Body panel options.
unlayer.setBodyValues({
  backgroundColor: '#e7e7e7',
  contentWidth: '500px', // or percent "50%"
  fontFamily: {
    label: 'Helvetica',
    value: "'Helvetica Neue', Helvetica, Arial, sans-serif",
  },
  preheaderText: 'Hello World',
});
Default Body Values
You can set default values for the Body panel options.
Text Color
unlayer.init({
  tools: {
    bodies: {
      properties: {
        textColor: {
          editor: {
            defaultValue: '#ff0000',
          },
        },
      },
    },
  },
});
Background Color
unlayer.init({
  tools: {
    bodies: {
      properties: {
        backgroundColor: {
          editor: {
            defaultValue: '#ff0000',
          },
        },
      },
    },
  },
});
Font Family
unlayer.init({
  tools: {
    bodies: {
      properties: {
        fontFamily: {
          editor: {
            defaultValue: {
              value: "'Open Sans',sans-serif",
            },
          },
        },
      },
    },
  },
});
Content Alignment
unlayer.init({
  tools: {
    bodies: {
      properties: {
        contentAlign: {
          editor: {
            defaultValue: 'center',
          },
        },
      },
    },
  },
});
Font Weight
unlayer.init({
  tools: {
    bodies: {
      properties: {
        fontWeight: {
          editor: {
            defaultValue: 700,
          },
        },
      },
    },
  },
});