Export of both text and HTML by default.
483220
@Override
    public List<ExportFormat> exportFormats(IssueServiceConfiguration issueServiceConfiguration) {
        return issueExportServiceFactory.getIssueExportServices().stream()
                .map(IssueExportService::getExportFormat)
                .collect(Collectors.toList());
    }
1340884
function buildJsFileContent(lines) {
    var ls = lines
        .map(l => l
            // remove space at beginning of line
            .replace(/^\s*/g, "")
            // remove space at end of line
            .replace(/\s*$/g, "")
            // convert \ to \\
            .replace(/\\/g, "\\\\")
            // convert " to \"
            .replace(/"/g, "\\\"")
            // convert " { " to "{"
            .replace(/\s*\{\s*/g, "{")
            // convert " : " to ":"
            .replace(/\s*:\s*/g, ":"))
        .join("")
        // remove comments
        .replace(/\/\*.+?\*\//g, "");

    return [
        // add css string
        `var css = "${ls}";`,
        "var enabled = false;",
        "",
        // add function which injects css into page
        "function enable () {",
        "\tif (enabled) return;",
        "\tenabled = true;",
        "",
        "\tvar el = document.createElement('style');",
        "\tel.innerHTML = css;",
        "",
        "\tvar parent = document.head || document.body;",
        "\tparent.firstChild ?",
        "\t\tparent.insertBefore(el, parent.firstChild) :",
        "\t\tparent.appendChild(el);",
        "}",
        "",
        "export {",
        "\tenable",
        "}"
    ].join("\n");
}
353714
protected String defaultActionHtml() {

        StringBuffer result = new StringBuffer(32);

        result.append(htmlStart());
        result.append(bodyStart(null));
        result.append(dialogStart());
        result.append(dialogContentStart(""));
        result.append("<form name=\"main\" class=\"nomargin\" action=\"");
        result.append(getJsp().link(getDialogReturnUri()));
        result.append("\" method=\"post\" onsubmit=\"submitAction('");
        result.append(DIALOG_OK);
        result.append("', null, 'main');\" enctype=\"multipart/form-data\">\n");
        result.append(paramsAsHidden());
        if (getParamFramename() == null) {
            result.append("<input type=\"hidden\" name=\"");
            result.append(PARAM_FRAMENAME);
            result.append("\" value=\"\">");
        }
        result.append(createDialogErrorMessage());
        result.append(dialogBlockStart(getStarttext()));
        result.append("<table border=\"0\" width=\"100%\">\n");
        result.append("<tr>\n\t<td style=\"white-space: nowrap;\" unselectable=\"on\">");
        result.append(getImportMessage());
        result.append(":</td>\n");
        result.append("\t<td class=\"maxwidth\">");
        result.append("<input type=\"file\" name=\"");
        result.append(PARAM_IMPORTFILE);
        result.append("\" class=\"maxwidth\" accept=\"application/zip\">");
        result.append("</td>\n</tr>");
        result.append(getAdditionalParameters());
        result.append("</table>\n");
        result.append(dialogBlockEnd());

        result.append(dialogContentEnd());
        result.append(dialogButtonsOkCancel());
        result.append("</form>\n");
        result.append(dialogEnd());
        result.append(bodyEnd());
        result.append(htmlEnd());
        return result.toString();
    }
1009405
def toggle_plain_text(self, checked):
        """"""
        if checked:
            self.docstring = checked
            self.switch_to_plain_text()
            self.force_refresh()
        self.set_option('rich_mode', not checked)
144338
def html(self, text=TEXT):
        
        self.logger.debug("Generating the HTML report{}..."
                          .format(["", " (text only)"][text]))
        html = []
        for piece in self._pieces:
            if isinstance(piece, string_types):
                html.append(markdown2.markdown(piece, extras=["tables"]))
            elif isinstance(piece, Element):
                html.append(piece.html())
        return "\n\n".join(html)
781980
def export_to_html(
    table, filename_or_fobj=None, encoding="utf-8", caption=False, *args, **kwargs
):
    """"""

    serialized_table = serialize(table, *args, **kwargs)
    fields = next(serialized_table)
    result = ["<table>\n\n"]
    if caption and table.name:
        result.extend(["  <caption>", table.name, "</caption>\n\n"])
    result.extend(["  <thead>\n", "    <tr>\n"])
    # TODO: set @name/@id if self.meta["name"] is set
    header = ["      <th> {} </th>\n".format(field) for field in fields]
    result.extend(header)
    result.extend(["    </tr>\n", "  </thead>\n", "\n", "  <tbody>\n", "\n"])
    for index, row in enumerate(serialized_table, start=1):
        css_class = "odd" if index % 2 == 1 else "even"
        result.append('    <tr class="{}">\n'.format(css_class))
        for value in row:
            result.extend(["      <td> ", escape(value), " </td>\n"])
        result.append("    </tr>\n\n")
    result.append("  </tbody>\n\n</table>\n")
    html = "".join(result).encode(encoding)

    return export_data(filename_or_fobj, html, mode="wb")
152617
def html_to_plain_text(html):
    """"""
    # Use BeautifulSoup to normalize the html
    soup = BeautifulSoup(html, "html.parser")
    # Init the parser
    parser = HTML2PlainParser()
    parser.feed(str(soup.encode('utf-8')))
    # Strip the end of the plain text
    result = parser.text.rstrip()
    # Add footnotes
    if parser.links:
        result += '\n\n'
        for link in parser.links:
            result += '[{}]: {}\n'.format(link[0], link[1])
    return result
685215
def html(self) -> str:
        """"""
        if self.parentNode and self.parentNode._should_escape_text:
            return html.escape(self.data)
        return self.data
241224
public function export()
    {
        $text = implode("\n", array_map([$this, 'formatMessage'], $this->messages)) . "\n";
        fwrite($this->getFp(), $text);
    }
284583
def _default_format(self, occur):
        """""" 
        if self.text or self.children:
            return self.start_tag() + "%s" + self.end_tag()
        return self.start_tag(empty=True)
503953
function ( event ) {
    var types = event.dataTransfer.types;
    var l = types.length;
    var hasPlain = false;
    var hasHTML = false;
    while ( l-- ) {
      switch ( types[l] ) {
      case 'text/plain':
        hasPlain = true;
        break;
      case 'text/html':
        hasHTML = true;
        break;
      default:
        return;
      }
    }
    if ( hasHTML || hasPlain ) {
      this.saveUndoState();
    }
  }
292777
def generate_xhtml(path, dirs, files):
    """"""
    # Prepare the path to display.
    if path != '/':
        dirs.insert(0, '..')
    if not path.endswith('/'):
        path += '/'

    def itemize(item):
        return '<a href="%s">%s</a>' % (item, path+item)
    dirs = [d + '/' for d in dirs]
    return """
    <html>
     <body>
      <h1>%s</h1>
       <pre>%s\n%s</pre>
     </body>
    </html>
    """ % (path, '\n'.join(itemize(dir) for dir in dirs), '\n'.join(itemize(file) for file in files))
1090248
function(markup) {
		markup = markup || "";
		return gui.Guide.suspend(function() {
			var doc = document.implementation.createHTMLDocument("");
			if (markup.toLowerCase().contains("<!doctype")) {
				try {
					doc.documentElement.innerHTML = markup;
				} catch (ie9exception) {
					doc = new ActiveXObject("htmlfile");
					doc.open();
					doc.write(markup);
					doc.close();
				}
			} else {
				doc.body.innerHTML = markup;
			}
			return doc;
		});
	}
83702
public static function exportStatic() {
		
		// default vars
		$exportDir = Config::getOption("exportDir");
		$publicDir = Config::getOption("publicDir");
		$sourceDir = Config::getOption("sourceDir");
		
		if (!is_dir($exportDir)) {
			mkdir($exportDir);
		}
		
		if (is_dir($publicDir)) {
			
			// decide which files in public should def. be ignored
			$ignore = array("annotations","data","patterns","styleguide","index.html","latest-change.txt",".DS_Store",".svn","README");
			
			$files = scandir($publicDir);
			foreach ($files as $key => $file) {
				if (($file == "..") || ($file == ".")) {
					unset($files[$key]);
				} else if (in_array($file,$ignore)) {
					unset($files[$key]);
				} else if (is_dir($publicDir.DIRECTORY_SEPARATOR.$file) && !is_dir($sourceDir.DIRECTORY_SEPARATOR.$file)) {
					unset($files[$key]);
				} else if (is_file($publicDir.DIRECTORY_SEPARATOR.$file) && !is_file($sourceDir.DIRECTORY_SEPARATOR.$file)) {
					unset($files[$key]);
				}
			}
			
			$fs = new Filesystem();
			foreach ($files as $file) {
				if (is_dir($publicDir.DIRECTORY_SEPARATOR.$file)) {
					$fs->mirror($publicDir.DIRECTORY_SEPARATOR.$file,$exportDir.DIRECTORY_SEPARATOR.$file);
				} else if (is_file($publicDir.DIRECTORY_SEPARATOR.$file)) {
					$fs->copy($publicDir.DIRECTORY_SEPARATOR.$file,$exportDir.DIRECTORY_SEPARATOR.$file);
				}
			}
			
		}
		
	}
1330310
private void fillExtendedHtmlImportDefault() {

        CmsExtendedHtmlImportDefault extimport = OpenCms.getImportExportManager().getExtendedHtmlImportDefault();
        extimport.setDestinationDir(m_htmlimport.getDestinationDir());
        extimport.setInputDir(m_htmlimport.getInputDir());
        extimport.setDownloadGallery(m_htmlimport.getDownloadGallery());
        extimport.setImageGallery(m_htmlimport.getImageGallery());
        extimport.setLinkGallery(m_htmlimport.getLinkGallery());
        extimport.setTemplate(m_htmlimport.getTemplate());
        extimport.setElement(m_htmlimport.getElement());
        extimport.setLocale(m_htmlimport.getLocale());
        extimport.setEncoding(m_htmlimport.getInputEncoding());
        extimport.setStartPattern(m_htmlimport.getStartPattern());
        extimport.setEndPattern(m_htmlimport.getEndPattern());
        extimport.setOverwrite(Boolean.toString(m_htmlimport.isOverwrite()));
        extimport.setKeepBrokenLinks(Boolean.toString(m_htmlimport.isKeepBrokenLinks()));
        OpenCms.getImportExportManager().setExtendedHtmlImportDefault(extimport);
    }
1261637
function renderHtml(fragment, opts) {
    var html = (!fragment || !u.trim(fragment._txt)) ?
      '&nbsp;' : // show space for empty/missing to allow selection/editing
      renderMarkdown(fragment._txt, opts);
    // use opts.noWrap to avoid breaking CSS nested selectors like li > ul in menus
    if (opts && opts.noWrap) return html;
    var href = (fragment && esc(fragment._href)) || '';
    return '<div data-render-html="' + href + '">' + html + '</div>';
  }
215063
function(type)
    {
        switch (type) {
            case WebInspector.Resource.Type.Document:
                return "document";
            case WebInspector.Resource.Type.Stylesheet:
                return "stylesheet";
            case WebInspector.Resource.Type.Image:
                return "image";
            case WebInspector.Resource.Type.Font:
                return "font";
            case WebInspector.Resource.Type.Script:
                return "script";
            case WebInspector.Resource.Type.XHR:
                return "xhr";
            case WebInspector.Resource.Type.WebSocket:
                return "websocket";
            case WebInspector.Resource.Type.Other:
            default:
                return "other";
        }
    }