Update HTML Widget
elementor_update_html_widgetUpdate an Elementor HTML widget's content while safely handling script tags, quotes, and special characters via base64 encoding; optionally set custom CSS.
Instructions
Update an HTML widget's content. Safely handles HTML containing tags, quotes, and special characters via base64 encoding. Optionally update custom CSS too.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"postId": "<postId>",
"elementId": "<elementId>",
"htmlContent": "<htmlContent>"
},
"name": "elementor_update_html_widget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| postId | Yes | WordPress post/page ID | |
| customCss | No | Optional custom CSS to set on the widget | |
| elementId | Yes | Elementor element ID of the HTML widget | |
| htmlContent | Yes | New HTML content for the widget |