Skip to main content
Module

x/docxml/mod.ts>CommentsXml

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
class CommentsXml
extends XmlFile
import { CommentsXml } from "https://deno.land/x/docxml@5.0.1/mod.ts";

Properties

private
readonly
comments: Comment[]

Methods

protected
toNode(): Promise<Document>
add(meta: Omit<Comment, "id" | "contents">, contents: Comment["contents"])

Add a comment to the DOCX file and return its new identifier. You should reference this identifier from the document using the Comment, CommentRangeStart and CommentRangeEnd components.

get(id: Comment["id"])
has(id: number)

Check whether or not a comment with the given identifier already exists.

set(
id: Comment["id"],
meta: Omit<Comment, "id" | "contents">,
contents: Comment["contents"],
): void

Static Methods

fromArchive(archive: Archive, location: string): Promise<Comments>

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