plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.

Home Page:https://plotly.com/dash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Help] how to add a contentChange listener on html.Div components

Snowdar opened this issue · comments

I hope to have an editable component that can support rich text (such as directly embedding other html tags), but it seems that only the html.Div component can. But I also hope that the callback can be triggered when the content in the component is changed, but html.Div only has click-related events.

Moreover, if the content of the div changes but the callback is not triggered, the content in html.Div does not seem to be updated to the server (or a virtual DOM?). Even if other buttons are used to trigger the callback at this time, and the content of the Div is used as input, the latest content in the div cannot be obtained.

Is there any way to achieve this, or are there any existing alternatives?

commented

@Snowdar that's a great question. Can you please post this on the community forum. Give it a few days, and if no one is able to answer it there, we can reopen the issue is.