> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Widget Content

> How to update the content of the an HTML widget or the Text Widget using the Update Widget Content dashboard action 

This action updates the content of an HTML widget or the [Text Widget](/docs/blink-platform/dashboards/building-a-dashboard/widgets/text) in a dashboard.

Supports Custom HTML widgets and Text widgets.

<Tabs>
  <Tab title="Custom HTML Widget">
    <div className="flow-table">
      | Parameter        | Description                                                                                                           |
      | ---------------- | --------------------------------------------------------------------------------------------------------------------- |
      | **Widget Type**  | The type of widget whose content you want to update (for example, **HTML Widget**).                                   |
      | **Content**      | The complete HTML page — either static or dynamic — that will replace the existing content in the Custom HTML widget. |
      | **Dashboard ID** | The unique ID of the dashboard containing the widget.                                                                 |
      | **Widget ID**    | The unique ID of the widget to update.                                                                                |
    </div>

    <Frame>
      <img src="https://mintcdn.com/blinkops-2/gqDVBOvB66GVdjeK/img/Dashboards/UpdateHTMLWidgetContent.png?fit=max&auto=format&n=gqDVBOvB66GVdjeK&q=85&s=a5a1e164671508d00902dac6b215be07" width="2320" height="795" data-path="img/Dashboards/UpdateHTMLWidgetContent.png" />
    </Frame>

    <Note>
      For dynamic [Custom HTML widgets](/docs/blink-platform/dashboards/building-a-dashboard/widgets/html) (animations, async data, delayed rendering), call the following from your script the moment your content is fully rendered so dashboard PDF exports wait for it: `parent.postMessage('html-widget:ready', '*');`

      Where you put the call depends on what your HTML does.

      **Common patterns:**

      * After a delayed render: `setTimeout(() => { /* render */ parent.postMessage('html-widget:ready', '*'); }, 1200);`

      * after an async fetch / data load: `fetch('...').then(data => { renderChart(data); parent.postMessage('html-widget:ready', '*'); });`

      * After window load for simple content: `window.addEventListener('load', () => parent.postMessage('html-widget:ready', '*'));`

      * If the call is omitted, the export falls back to a 5-second wait after the iframe loads and screenshots whatever is on screen.
    </Note>
  </Tab>

  <Tab title="Text Widget">
    <div className="flow-table">
      | Parameter        | Description                                                                         |
      | ---------------- | ----------------------------------------------------------------------------------- |
      | **Widget Type**  | The type of widget whose content you want to update (for example, **Text Widget**). |
      | **Content**      | The text that will replace the existing content in the Text widget.                 |
      | **Dashboard ID** | The unique ID of the dashboard containing the widget.                               |
      | **Widget ID**    | The unique ID of the widget to update.                                              |
    </div>

    <Frame>
      <img src="https://mintcdn.com/blinkops-2/gqDVBOvB66GVdjeK/img/Dashboards/UpdateTextWidgetContent.png?fit=max&auto=format&n=gqDVBOvB66GVdjeK&q=85&s=8013e50410e3736d7135cc5c894bdafa" width="2316" height="788" data-path="img/Dashboards/UpdateTextWidgetContent.png" />
    </Frame>
  </Tab>
</Tabs>
