Skip to main content
Module

x/docxml/mod.ts>Image

TypeScript (component) library for building and parsing a DOCX file
Go to Latest
class Image
extends Component<ImageProps, ImageChild>
import { Image } from "https://deno.land/x/docxml@5.13.0/mod.ts";

A component that represents an image in your DOCX document. You can create a new image by passing any promise to an Uint8Array into the data prop, eg. get it from your file system or from a web request.

Constructors

new
Image(props: ImageProps, ...children: ImageChild[])

Properties

readonly
meta

Methods

An event hook with which this component can ensure that the correct relationship type is recorded to the relationship XML.

toNode(_ancestry: ComponentAncestor[]): Node

Creates an XML DOM node for this component instance.

Static Properties

readonly
children: string[]
readonly
mixed: boolean

Static Methods

fromNode(node: Node, unnamed 1: ComponentContext): Image

Instantiate this component from the XML in an existing DOCX file.

matchesNode(node: Node): boolean

Asserts whether or not a given XML node correlates with this component.