n8n-nodes-base
Version:
Base nodes of n8n
147 lines (144 loc) • 6.13 kB
text/typescript
/**
* Markdown Node - Version 1
* Discriminator: mode=markdownToHtml
*/
/** Convert data from Markdown to HTML */
export type MarkdownV1MarkdownToHtmlParams = {
mode: 'markdownToHtml';
/**
* The Markdown to be converted to html
*/
markdown?: string | Expression<string> | PlaceholderValue;
/**
* The field to put the output in. Specify nested fields using dots, e.g."level1.level2.newKey".
* @default data
*/
destinationKey?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @default {}
*/
options?: {
/** Whether to open all links in new windows (by adding the attribute target="_blank" to <a> tags)
* @default false
*/
openLinksInNewWindow?: boolean | Expression<boolean>;
/** Whether to enable automatic linking to URLs
* @default false
*/
simplifiedAutoLink?: boolean | Expression<boolean>;
/** Whether to support for HTML Tag escaping ex: <div>foo</div>
* @default false
*/
backslashEscapesHTMLTags?: boolean | Expression<boolean>;
/** Whether to output a complete html document, including <html>, <head> and <body> tags instead of an HTML fragment
* @default false
*/
completeHTMLDocument?: boolean | Expression<boolean>;
/** Whether to use text in curly braces as header ID
* @default false
*/
customizedHeaderId?: boolean | Expression<boolean>;
/** Whether to enable emoji support. Ex: this is a :smile: emoji For more info on available emojis, see https://github.com/showdownjs/showdown/wiki/Emojis.
* @default false
*/
emoji?: boolean | Expression<boolean>;
/** Whether to enable e-mail addresses encoding through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities
* @default true
*/
encodeEmails?: boolean | Expression<boolean>;
/** Whether to exclude trailing punctuation from autolinking URLs. Punctuation excluded: . ! ? ( ). Only applies if simplifiedAutoLink option is set to true.
* @default false
*/
excludeTrailingPunctuationFromURLs?: boolean | Expression<boolean>;
/** Whether to enable support for GFM code block style
* @default true
*/
ghCodeBlocks?: boolean | Expression<boolean>;
/** Whether to generate header IDs compatible with github style (spaces are replaced with dashes and a bunch of non alphanumeric chars are removed)
* @default false
*/
ghCompatibleHeaderId?: boolean | Expression<boolean>;
/** Whether to change the link generated by @mentions. Showdown will replace {u} with the username. Only applies if ghMentions option is enabled.
* @default https://github.com/{u}
*/
ghMentionsLink?: string | Expression<string> | PlaceholderValue;
/** Whether to enable github @mentions, which link to the username mentioned
* @default false
*/
ghMentions?: boolean | Expression<boolean>;
/** Whether to enable support for GFM tasklists
* @default false
*/
tasklists?: boolean | Expression<boolean>;
/** Whether to set the header starting level
* @default 1
*/
headerLevelStart?: number | Expression<number>;
/** Whether to make adding a space between # and the header text mandatory
* @default false
*/
requireSpaceBeforeHeadingText?: boolean | Expression<boolean>;
/** Whether to stop showdown from interpreting asterisks in the middle of words as <em> and <strong> and instead treat them as literal asterisks
* @default false
*/
literalMidWordAsterisks?: boolean | Expression<boolean>;
/** Whether to stop showdown from interpreting underscores in the middle of words as <em> and <strong> and instead treat them as literal underscores
* @default false
*/
literalMidWordUnderscores?: boolean | Expression<boolean>;
/** Whether to disable the automatic generation of header IDs
* @default false
*/
noHeaderId?: boolean | Expression<boolean>;
/** Whether to enable support for setting image dimensions from within markdown syntax
* @default false
*/
parseImgDimensions?: boolean | Expression<boolean>;
/** Add a prefix to the generated header IDs
* @default section
*/
prefixHeaderId?: string | Expression<string> | PlaceholderValue;
/** Whether to remove only spaces, ' and " from generated header IDs (including prefixes), replacing them with dashes (-)
* @default false
*/
rawHeaderId?: boolean | Expression<boolean>;
/** Whether to prevent showdown from modifying the prefix
* @default false
*/
rawPrefixHeaderId?: boolean | Expression<boolean>;
/** Whether to parse line breaks as <br>, like GitHub does, without needing 2 spaces at the end of the line
* @default false
*/
simpleLineBreaks?: boolean | Expression<boolean>;
/** Whether to try to smartly fix indentation problems related to es6 template strings in the midst of indented code
* @default false
*/
smartIndentationFix?: boolean | Expression<boolean>;
/** Whether to disable the requirement of indenting sublists by 4 spaces for them to be nested, effectively reverting to the old behavior where 2 or 3 spaces were enough
* @default false
*/
disableForced4SpacesIndentedSublists?: boolean | Expression<boolean>;
/** Whether to split adjacent blockquote blocks
* @default false
*/
splitAdjacentBlockquotes?: boolean | Expression<boolean>;
/** Whether to enable support for strikethrough syntax
* @default false
*/
strikethrough?: boolean | Expression<boolean>;
/** Whether to add an ID property to table headers tags
* @default false
*/
tablesHeaderId?: boolean | Expression<boolean>;
/** Whether to enable support for tables syntax
* @default false
*/
tables?: boolean | Expression<boolean>;
};
};
export type MarkdownV1MarkdownToHtmlNode = {
type: 'n8n-nodes-base.markdown';
version: 1;
config: NodeConfig<MarkdownV1MarkdownToHtmlParams>;
};