#cp.web.generate

Functions for Generating HTML UI Items


#API Overview

Functions - API calls offered directly by the extension


#API Documentation

#Functions

Signaturecp.web.generate.button(data, customTrigger, customWidth, customID) -> string
TypeFunction
DescriptionGenerates a HTML Button
Parameters
  • data - Table containing the data you want to display on the Checkbox
  • customTrigger - Custom label used for JavaScript Callback
  • customWidth - Number to set the width of the button to
  • customID - Overrides the random HTML ID
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 141

Signaturecp.web.generate.checkbox(data, customTrigger, customID) -> string
TypeFunction
DescriptionGenerates a HTML Checkbox
Parameters
  • data - Table containing the data you want to display on the Checkbox
  • customTrigger - Custom label used for JavaScript Callback
  • customID - Custom ID used for the HTML objects
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 59

Signaturecp.web.generate.dropdown(title, data, customTrigger) -> string
TypeFunction
DescriptionGenerates a HTML Dropdown
Parameters
  • title - Title to put in front of the Dropdown. Can be "".
  • data - Table containing the data you want to display on the Checkbox
  • customTrigger - Custom label used for JavaScript Callback
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 183

Signaturecp.web.generate.heading(data) -> string
TypeFunction
DescriptionGenerates a HTML Heading
Parameters
  • data - Table containing the data you want to display on the Checkbox
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 115

Signaturecp.web.generate.javascript(script, context) -> cp.web.html
TypeFunction
DescriptionGenerates a HTML Heading
Parameters
  • data - Table containing the data you want to display on the Checkbox
  • context - The context
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 98

Signaturecp.web.generate.setWebviewLabel() -> none
TypeFunction
DescriptionSets the WebView Label
Parameters
  • value - WebView Label as string
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 46

Signaturecp.web.generate.text(data) -> string
TypeFunction
DescriptionGenerates a blank HTML
Parameters
  • data - Table containing the data you want to display.
Returns
  • String containing the HTML
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/web/generate.lua line 128