public class MarkdownDocument extends Object
Constructor and Description |
---|
MarkdownDocument() |
MarkdownDocument(String markdown) |
Modifier and Type | Method and Description |
---|---|
static MarkdownDocument |
fromFile(Path fileName)
Loads a document from file
|
static MarkdownDocument |
fromPluginResource(String internalPath,
Map<String,Class<?>> additionalResourceProtocols)
Loads a document from the JIPipe plugin resources
|
static MarkdownDocument |
fromResourceURL(URL resourcePath,
boolean enableResourceProtocol,
Map<String,Class<?>> additionalResourceProtocols)
Loads a document from a resource URL
|
String |
getMarkdown() |
String |
getRenderedHTML() |
HTMLText |
getRenderedHTMLText() |
public MarkdownDocument()
public MarkdownDocument(String markdown)
markdown
- markdown textpublic static MarkdownDocument fromFile(Path fileName)
fileName
- filenamepublic static MarkdownDocument fromPluginResource(String internalPath, Map<String,Class<?>> additionalResourceProtocols)
internalPath
- resource path. Relative to JIPipe resourcesadditionalResourceProtocols
- Additional protocols. The key is the name of the protocol, while the value sets the resource loader classpublic static MarkdownDocument fromResourceURL(URL resourcePath, boolean enableResourceProtocol, Map<String,Class<?>> additionalResourceProtocols)
resourcePath
- resource pathenableResourceProtocol
- Allows to target core JIPipe resources with resource://additionalResourceProtocols
- Additional protocols. The key is the name of the protocol, while the value sets the resource loader classpublic String getRenderedHTML()
public HTMLText getRenderedHTMLText()
public String getMarkdown()
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.