2021-08-03 15:58:26 +02:00
|
|
|
// See https://www.ecma-international.org/publications/standards/Ecma-376.htm (at Part 1, Page 1234)
|
|
|
|
import { Begin, End } from "file/paragraph/run/field";
|
|
|
|
import { Run } from "../run";
|
2021-09-08 00:41:40 +01:00
|
|
|
import { PageReferenceFieldInstruction } from "./pageref-field-instruction";
|
|
|
|
import type { IPageReferenceOptions } from "./pageref-properties";
|
2021-08-03 15:58:26 +02:00
|
|
|
|
2021-09-08 00:41:40 +01:00
|
|
|
export class PageReference extends Run {
|
|
|
|
constructor(bookmarkId: string, options: IPageReferenceOptions = {}) {
|
2021-08-03 15:58:26 +02:00
|
|
|
super({
|
2021-09-08 00:41:40 +01:00
|
|
|
children: [new Begin(true), new PageReferenceFieldInstruction(bookmarkId, options), new End()],
|
2021-08-03 15:58:26 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|