:feat: support emphasis mark
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark";
|
||||
import * as formatting from "file/paragraph/run/formatting";
|
||||
import { RunProperties } from "file/paragraph/run/properties";
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
@ -23,6 +24,9 @@ export interface IBaseCharacterStyleOptions {
|
||||
readonly type?: UnderlineType;
|
||||
readonly color?: string;
|
||||
};
|
||||
readonly emphasisMark?: {
|
||||
readonly type?: EmphasisMarkType;
|
||||
};
|
||||
readonly color?: string;
|
||||
readonly font?: string;
|
||||
readonly characterSpacing?: number;
|
||||
@ -104,6 +108,10 @@ export class CharacterStyle extends Style {
|
||||
this.runProperties.push(new formatting.Underline(options.run.underline.type, options.run.underline.color));
|
||||
}
|
||||
|
||||
if (options.run.emphasisMark) {
|
||||
this.runProperties.push(new formatting.EmphasisMark(options.run.emphasisMark.type));
|
||||
}
|
||||
|
||||
if (options.run.color) {
|
||||
this.runProperties.push(new formatting.Color(options.run.color));
|
||||
}
|
||||
|
Reference in New Issue
Block a user