org.docx4j.convert.out.html.HtmlScriptHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx4j-core Show documentation
Show all versions of docx4j-core Show documentation
docx4j is a library which helps you to work with the Office Open
XML file format as used in docx
documents, pptx presentations, and xlsx spreadsheets.
package org.docx4j.convert.out.html;
public class HtmlScriptHelper {
public static void createDefaultScript(StringBuilder result) {
result.append("function toggleDiv(divid){");
result.append("if(document.getElementById(divid).style.display == 'none'){");
result.append("document.getElementById(divid).style.display = 'block';");
result.append("}else{");
result.append("document.getElementById(divid).style.display = 'none';");
result.append("}");
result.append("}\n");
}
}