apps/wp-importer
default: DevToolbarApp;
Defined in: studiocms/packages/studiocms_devapps/src/apps/wp-importer.ts:45
Defines a toolbar application for importing content from a WordPress site into StudioCMS.
The canvas element where the application will be rendered.
The target element for event listeners.
- The toolbar application definition.
init Initializes the toolbar application by creating the canvas and setting up event listeners.
createCanvas Creates and appends the main window component to the canvas. Sets up the form and its event listeners.
closeOnOutsideClick Closes the window component when a click is detected outside of the specified event target.
‘astro:after-swap’ Recreates the canvas when the ‘astro:after-swap’ event is triggered.
‘submit’ Handles the form submission, including validation, showing a loading spinner, and making a POST request to the WordPress API endpoint.
wpAPIEndpoint - The endpoint URL for the WordPress API.