移除默认值
自动删除文档中所有文本字段内的特定默认值。
(function () {
let doc = Api.GetDocument();
let forms = doc.GetAllForms();
let defaultValue = "Text";
forms.forEach(form => {
if (form.GetFormType() === "textForm" && form.GetText() === defaultValue) {
form.Clear();
}
});
})();
使用方法: GetDocument, GetAllForms, GetFormType, GetText, Clear
结果
