在设计模板时,如何创建一个像微软原版模板那样的虚拟文本?
When designing a template, how can I create a dummy text, like those in Microsoft's original templates?
您知道 Microsoft 的 Word 模板,例如简历模板或正式信函模板等。这些模板具有虚拟文本,例如“您可以编辑此部分 bla bla ...”
我正在设计一个模板供我的朋友使用。我想添加一个可以通过单击进行编辑的段落。我该怎么做?
这就是我想说的 (gif):https://s8.gifyu.com/images/gif37fd08f069cff363.gif
我试过使用“MacroButton noname [文本]”,但它不允许使用超过 1 行的文本。
Microsoft 模板使用内容控件(在“开发人员”选项卡上)。使用富文本或纯文本 CC,打开“属性”对话框并将 显示为 下拉列表设置为 None 并选中该选项编辑内容时删除内容控件。
现在是棘手的部分:单击时选中整个段落。您不能使用“属性”对话框进行设置。相反,您必须编辑 XML,添加旁边带有注释的行:
<w:sdt>
<w:sdtPr>
<w:id w:val="1781998595"/>
<w:placeholder>
<w:docPart w:val="A97E97C2665C45749484CCB99C007209"/>
</w:placeholder>
<w:temporary/>
<w:showingPlcHdr/><!--Add this line to the XML to make text get selected with single click-->
<w15:appearance w15:val="hidden"/>
</w:sdtPr>
<w:sdtContent>
<w:p w14:paraId="5C4F7F28" w14:textId="240370F5" w:rsidR="005B3871" w:rsidRDefault="005B3871" w:rsidP="005B3871">
<w:r>
<w:t>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.</w:t>
</w:r>
</w:p>
</w:sdtContent>
</w:sdt>
这是我对编辑 OOXML 的介绍:OOXML Hacking: An Introduction
您知道 Microsoft 的 Word 模板,例如简历模板或正式信函模板等。这些模板具有虚拟文本,例如“您可以编辑此部分 bla bla ...”
我正在设计一个模板供我的朋友使用。我想添加一个可以通过单击进行编辑的段落。我该怎么做?
这就是我想说的 (gif):https://s8.gifyu.com/images/gif37fd08f069cff363.gif
我试过使用“MacroButton noname [文本]”,但它不允许使用超过 1 行的文本。
Microsoft 模板使用内容控件(在“开发人员”选项卡上)。使用富文本或纯文本 CC,打开“属性”对话框并将 显示为 下拉列表设置为 None 并选中该选项编辑内容时删除内容控件。
现在是棘手的部分:单击时选中整个段落。您不能使用“属性”对话框进行设置。相反,您必须编辑 XML,添加旁边带有注释的行:
<w:sdt>
<w:sdtPr>
<w:id w:val="1781998595"/>
<w:placeholder>
<w:docPart w:val="A97E97C2665C45749484CCB99C007209"/>
</w:placeholder>
<w:temporary/>
<w:showingPlcHdr/><!--Add this line to the XML to make text get selected with single click-->
<w15:appearance w15:val="hidden"/>
</w:sdtPr>
<w:sdtContent>
<w:p w14:paraId="5C4F7F28" w14:textId="240370F5" w:rsidR="005B3871" w:rsidRDefault="005B3871" w:rsidP="005B3871">
<w:r>
<w:t>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.</w:t>
</w:r>
</w:p>
</w:sdtContent>
</w:sdt>
这是我对编辑 OOXML 的介绍:OOXML Hacking: An Introduction