Skip to main content
Module

x/docxml/mod.ts>SettingsXml

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
class SettingsXml
extends XmlFileWithContentTypes
import { SettingsXml } from "https://deno.land/x/docxml@5.15.0/mod.ts";

Constructors

new
SettingsXml(
location: string,
relationships?,
settings?: Partial<SettingsI>,
)

Properties

readonly
relationships: RelationshipsXml

Methods

protected
toNode(): Document

Returns a list of setting key values (similar to Object.entries). Useful for cloning these settings into a new instance.

get<Key extends keyof SettingsI>(key: Key): SettingsI[Key]

Get a setting.

Get all XmlFile instances related to this one, including self. This helps the system serialize itself back to DOCX fullly. Probably not useful for consumers of the library.

By default only returns the instance itself but no other related instances.

set<Key extends keyof SettingsI>(key: Key, value: SettingsI[Key]): void

Set a setting.

Static Methods

fromArchive(
archive: Archive,
contentTypes: ContentTypesXml,
location: string,
): Promise<SettingsXml>

Instantiate this class by looking at the DOCX XML for it.