Skip to content

Latest commit

 

History

History
181 lines (131 loc) · 5.43 KB

File metadata and controls

181 lines (131 loc) · 5.43 KB

Convert Table To HTML

Convert Table To HTML

Overview

Converts a Data Table to a customizable HTML table string. Supports inline styling, CSS classes, table captions, cell escaping, and optionally wrapping the table in a full HTML page structure.

Parameters

1. inputTable (TABLE)

  • Label: Input Data Table
  • Description: The data table to convert to an HTML table string.
  • Required: Yes
  • Default: None
  • Constraints: None

2. includeHeader (CHECKBOX)

  • Label: Include table header (<thead>)
  • Description: If checked, the table schema will be used to generate <th> elements within a <thead>.
  • Required: Yes
  • Default: true
  • Constraints: None

3. tableAttributesGroup (GROUP)

  • Label: Table Attributes & Caption
  • Description: Group of optional attributes applied to the <table> element and caption.
  • Required: No
  • Default: None
  • Constraints: None

3.1 tableId (TEXT)

  • Label: Table ID
  • Description: HTML id attribute for the <table> tag.
  • Required: No
  • Default: None
  • Constraints: None

3.2 tableCssClasses (LIST)

  • Label: Table CSS Class(es)
  • Description: List of CSS class(es) for the <table> tag.
  • Required: No
  • Default: None
  • Constraints: Each item must be a String

3.3 tableCaption (TEXT)

  • Label: Table Caption
  • Description: Text for the <caption> element within the table.
  • Required: No
  • Default: None
  • Constraints: None

4. enableInlineStyling (CHECKBOX)

  • Label: Enable Inline Styling
  • Description: Enable or disable all inline CSS styling options below.
  • Required: Yes
  • Default: true
  • Constraints: None

4.1 tableStyle (TEXTAREA)

  • Label: <table> Style
  • Description: Inline CSS for the <table> element. e.g., border-collapse:collapse; width:100%;
  • Required: No
  • Default: border-collapse:collapse; border: 1px solid #dddddd; width: 100%; font-family: Arial, sans-serif;
  • Constraints: None

4.2 theadStyle (TEXTAREA)

  • Label: <thead> Style
  • Description: Inline CSS for the <thead> element.
  • Required: No
  • Default: None
  • Constraints: None

4.3 tbodyStyle (TEXTAREA)

  • Label: <tbody> Style
  • Description: Inline CSS for the <tbody> element.
  • Required: No
  • Default: None
  • Constraints: None

4.4 thStyle (TEXTAREA)

  • Label: <th> Style
  • Description: Inline CSS for table header (<th>) cells. e.g., background-color:#f2f2f2; text-align:left; padding:8px;
  • Required: No
  • Default: background-color:#f0f0f0; border:1px solid #cccccc; color:#333333; padding:10px 5px; text-align:left; vertical-align:top; font-weight:bold;
  • Constraints: None

4.5 trStyle (TEXTAREA)

  • Label: Default <tr> Style
  • Description: Inline CSS for all table rows (<tr>) in <tbody>.
  • Required: No
  • Default: None
  • Constraints: None

4.6 trEvenStyle (TEXTAREA)

  • Label: Even <tr> Style
  • Description: Inline CSS for even table rows (<tr>) in <tbody>. Overrides Default <tr> Style.
  • Required: No
  • Default: None
  • Constraints: None

4.7 trOddStyle (TEXTAREA)

  • Label: Odd <tr> Style
  • Description: Inline CSS for odd table rows (<tr>) in <tbody>. Overrides Default <tr> Style.
  • Required: No
  • Default: None
  • Constraints: None

4.8 tdStyle (TEXTAREA)

  • Label: <td> Style
  • Description: Inline CSS for table data (<td>) cells. e.g., padding:8px; border:1px solid #ddd;
  • Required: No
  • Default: border:1px solid #cccccc; color:#333333; padding:10px 5px; text-align:left; vertical-align:top;
  • Constraints: None

5. escapeHtmlInCells (CHECKBOX)

  • Label: Escape HTML in cell data
  • Description: If checked, special HTML characters in cell data will be escaped (e.g., '<' becomes '<').
  • Required: Yes
  • Default: true
  • Constraints: None

6. fullPageGroup (GROUP)

  • Label: Full HTML Page Generation
  • Description: Group of options for wrapping the table in a complete HTML document.
  • Required: No
  • Default: None
  • Constraints: None

6.1 generateCompleteHtmlPage (CHECKBOX)

  • Label: Generate complete HTML page
  • Description: If checked, the table will be wrapped in a full HTML document structure.
  • Required: Yes
  • Default: false
  • Constraints: None

6.1.1 customPageTitle (TEXT)

  • Label: Page Title
  • Description: Title for the HTML page. Used if 'Generate complete HTML page' is checked.
  • Required: No
  • Default: None
  • Constraints: None

6.1.2 additionalHeadContent (TEXTAREA)

  • Label: Additional <head> Content
  • Description: Additional HTML content for the <head> section (e.g., <style> tags, <link> to CSS). Used if 'Generate complete HTML page' is checked.
  • Required: No
  • Default: None
  • Constraints: None

Output

Returns a STRING containing an HTML string representing the table.

Exceptions

Throws BotCommandException on invalid input or internal failure.

Notes

Inline styling sub-parameters (4.1 through 4.8) are only applied when "Enable Inline Styling" (parameter 4) is checked. The "Generate complete HTML page" sub-parameters (6.1.1 and 6.1.2) are only used when parameter 6.1 is checked.