/** * HTML Node - Version 1.1 * Work with HTML */ export interface HtmlV11Params { operation?: 'generateHtmlTemplate' | 'extractHtmlContent' | 'convertToHtmlTable'; /** * HTML template to render * @builderHint Use expressions to generate loops, reference data, etc. Does not support handlebars. * @displayOptions.show { operation: ["generateHtmlTemplate"] } */ html?: string; /** * If HTML should be read from binary or JSON data * @displayOptions.show { operation: ["extractHtmlContent"] } * @default json */ sourceData?: 'binary' | 'json' | Expression; /** * Input Binary Field * @hint The name of the input binary field containing the file to be extracted * @displayOptions.show { operation: ["extractHtmlContent"], sourceData: ["binary", "json"] } * @default data */ dataPropertyName?: string | Expression | PlaceholderValue; /** * Extraction Values * @displayOptions.show { operation: ["extractHtmlContent"] } * @default {"values":[{"key":"","cssSelector":"","returnValue":"text","returnArray":false}]} */ extractionValues?: { /** Values */ values?: Array<{ /** The key under which the extracted value should be saved */ key?: string | Expression | PlaceholderValue; /** The CSS selector to use */ cssSelector?: string | Expression | PlaceholderValue; /** What kind of data should be returned * @default text */ returnValue?: 'attribute' | 'html' | 'text' | 'value' | Expression; /** The name of the attribute to return the value off * @displayOptions.show { returnValue: ["attribute"] } */ attribute?: string | Expression | PlaceholderValue; /** Comma-separated list of selectors to skip in the text extraction * @displayOptions.show { returnValue: ["text"] } */ skipSelectors?: string | Expression | PlaceholderValue; /** Whether to return the values as an array so if multiple ones get found they also get returned separately. If not set all will be returned as a single string. * @default false */ returnArray?: boolean | Expression; }>; }; /** * Options * @displayOptions.show { operation: ["extractHtmlContent", "convertToHtmlTable"] } * @default {} */ options?: { /** Whether to remove automatically all spaces and newlines from the beginning and end of the values * @default true */ trimValues?: boolean | Expression; /** Whether to remove leading and trailing whitespaces, line breaks (newlines) and condense multiple consecutive whitespaces into a single space * @default true */ cleanUpText?: boolean | Expression; /** Whether to capitalize the headers * @default false */ capitalize?: boolean | Expression; /** Whether to use custom styling * @default false */ customStyling?: boolean | Expression; /** Caption to add to the table */ caption?: string | Expression | PlaceholderValue; /** Attributes to attach to the table */ tableAttributes?: string | Expression | PlaceholderValue; /** Attributes to attach to the table header */ headerAttributes?: string | Expression | PlaceholderValue; /** Attributes to attach to the table row */ rowAttributes?: string | Expression | PlaceholderValue; /** Attributes to attach to the table cell */ cellAttributes?: string | Expression | PlaceholderValue; }; } interface HtmlV11NodeBase { type: 'n8n-nodes-base.html'; version: 1.1; } export type HtmlV11ParamsNode = HtmlV11NodeBase & { config: NodeConfig; }; export type HtmlV11Node = HtmlV11ParamsNode;