Skip to content

setting default styles #65

@kinecology

Description

@kinecology

In your readme, I see this as a possible way to change default styles:

const wordDocument = defaultDocxSerializer.serialize(state.doc, opts, (state) => {
  return {
    numbering: {
      config: state.numbering,
    },
    fonts: [], // embed fonts,
    styles: {
      paragraphStyles,
      default: {
        heading1: paragraphStyles[1],
      },
    },
  };
});

Is styles an externalStyles, and paragraphStyles just an XML string, like this demo at docx.js?

const styles = fs.readFileSync("./demo/assets/custom-styles.xml", "utf-8");
...

Do styles have to be defined in XML? All I want to do is be able to set the default font size and the size of the headings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions