new (require("tiny_aiplacement/generatebase"))(editor)
- Description:
Class constructor.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
editor |
TinyMCE.editor | The tinyMCE editor instance. |
Methods
(async) addContentEventListeners(modal)
- Description:
Add event listeners for the text modal.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
modal |
Modal |
(async) displayContentModal()
- Description:
Display the modal when the AI button is clicked.
- Source:
(async) displayLoading(root, submitBtn, removeClass)
- Description:
Display the loading state in the modal.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
root |
HTMLElement | The root element of the modal. |
|
submitBtn |
HTMLElement | The submit button element. |
|
removeClass |
String | null |
null
|
The class to be removed from the loading spinner div, if any. |
(async) hideLoading(root, submitBtn)
- Description:
Hide the loading action in the modal.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
root |
Object | The root element of the modal. |
submitBtn |
Object | The submit button element. |
hideLoadingSpinner(root)
- Description:
Hide the loading spinner.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
root |
Object | The root element of the modal. |
(async) setupModal() → {TextModal}
- Description:
Set up the base text generation modal with default body content.
- Source:
Returns:
The image modal object.
- Type
- TextModal