class Styles
extends XmlFile
import { Styles } from "https://deno.land/x/docxml@4.0.7/src/files/Styles.ts";
Methods
protected
toNode(): DocumentAdd 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
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<Styles>
Instantiate this class by looking at the DOCX XML for it.