Copy
创建段落副本。忽略批注、脚注引用和复杂域。
语法
expression.Copy();
expression - 表示 ApiParagraph 类的变量。
参数
此方法没有任何参数。
返回值
示例
复制段落并将副本追加到文档末尾。
// How do I copy a paragraph and place it elsewhere in a document?
// Reuse existing paragraph content without retyping it in a document.
let doc = Api.GetDocument();
let paragraph1 = doc.GetElement(0);
paragraph1.AddText("This is just a sample text that was copied.");
let paragraph2 = paragraph1.Copy();
doc.Push(paragraph2);