tiny_aiplacement/generatetext

Description:
  • Tiny AI generate text.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Tiny AI generate text.

Methods

(async) displayGeneratedText(root)

Description:
  • Display the generated image in the modal.

Source:
Parameters:
Name Type Description
root HTMLElement

The root element of the modal.

getRequestArgs(root)

Description:
  • Get the request args for the generated text.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

handleContentModalClick(e, root)

Description:
  • Handle click events within the text modal.

Source:
Parameters:
Name Type Description
e Event

The click event object.

root HTMLElement

The root element of the modal.

(async) handleGenerationError(root, submitBtn, errorMessage)

Description:
  • Handle a generation error.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

submitBtn Object

The submit button element.

errorMessage String

The error message to display.

(async) handleInsert(root, submitBtn)

Description:
  • Handle the insert action.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

submitBtn HTMLElement

The submit button element.

(async) handleSubmit(root, submitBtn)

Description:
  • Handle the submit action.

Source:
Parameters:
Name Type Description
root Object

The root element of the modal.

submitBtn Object

The submit button element.

setupPromptArea(root)

Description:
  • Set up the prompt area in the modal, adding necessary event listeners.

Source:
Parameters:
Name Type Description
root HTMLElement

The root element of the modal.