Word.Alignment enum
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml
await Word.run(async (context) => {
const body: Word.Body = context.document.body;
body.clear();
body.insertParagraph(
"Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.",
"Start"
);
body.paragraphs
.getLast()
.insertText(
"To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.",
"Replace"
);
body.paragraphs.getFirst().alignment = "Left";
body.paragraphs.getLast().alignment = Word.Alignment.left;
});
字段
centered = "Centered" | 与中心对齐。 |
justified = "Justified" | 完全对齐对齐。 |
left = "Left" | 向左对齐。 |
mixed = "Mixed" | |
right = "Right" | 向右对齐。 |
unknown = "Unknown" | 未知的对齐方式。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈