Make internal hyperlink declarative
This commit is contained in:
@ -3,6 +3,10 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { TextRun } from "../run";
|
||||
import { BookmarkEndAttributes, BookmarkStartAttributes } from "./bookmark-attributes";
|
||||
|
||||
export class BookmarkRef {
|
||||
constructor(public readonly name: string, public readonly text: string) {}
|
||||
}
|
||||
|
||||
export class Bookmark {
|
||||
public readonly linkId: number;
|
||||
public readonly start: BookmarkStart;
|
||||
|
@ -3,6 +3,11 @@ import { XmlComponent } from "file/xml-components";
|
||||
import { TextRun } from "../run";
|
||||
import { HyperlinkAttributes, IHyperlinkAttributesProperties } from "./hyperlink-attributes";
|
||||
|
||||
export enum HyperlinkType {
|
||||
INTERNAL = "INTERNAL",
|
||||
EXTERNAL = "EXTERNAL",
|
||||
}
|
||||
|
||||
export class HyperlinkRef {
|
||||
constructor(public readonly id: string) {}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import { ContextualSpacing, ISpacingProperties, Spacing } from "./formatting/spa
|
||||
import { HeadingLevel, Style } from "./formatting/style";
|
||||
import { LeaderType, TabStop, TabStopPosition, TabStopType } from "./formatting/tab-stop";
|
||||
import { NumberProperties } from "./formatting/unordered-list";
|
||||
import { Bookmark, HyperlinkRef, OutlineLevel } from "./links";
|
||||
import { Bookmark, BookmarkRef, HyperlinkRef, OutlineLevel } from "./links";
|
||||
import { ParagraphProperties } from "./properties";
|
||||
import { PictureRun, Run, SequentialIdentifier, SymbolRun, TextRun } from "./run";
|
||||
|
||||
@ -46,7 +46,7 @@ export interface IParagraphOptions {
|
||||
readonly custom?: boolean;
|
||||
};
|
||||
readonly children?: Array<
|
||||
TextRun | PictureRun | SymbolRun | Bookmark | PageBreak | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef
|
||||
TextRun | PictureRun | SymbolRun | Bookmark | PageBreak | SequentialIdentifier | FootnoteReferenceRun | HyperlinkRef | BookmarkRef
|
||||
>;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user