import { StylesXml } from "https://deno.land/x/docxml@5.11.4/mod.ts";
Methods
protected
toNode(): Documentadd(properties: Omit<AnyStyleDefinition, "id"> & { id?: string; })
Add a custom style to the available style palette. If it does not have an identifier already, the system will propose an identifier based on the style name, or create a unique GUID. This method throws when the identifier is not unique.
addLatent(properties: LatentStyle)
Adds a latent style, which means that the Word processor should determine its actual properties
addStyles(styles: AnyStyleDefinition[])
Add several custom styles to the available palette. Useful for cloning the style configuration of another DOCX.
deprecated
ensureStyle(id: string)Ensure that a style with this identifier exists. If it doesn't already exist, an empty (paragraph) style is added just in time.
hasStyle(id: string)
Checks wether a custom style or a latent style with this identifier already exists.
isEmpty()
Static Methods
fromArchive(archive: Archive, location: string): Promise<StylesXml>
Instantiate this class by looking at the DOCX XML for it.