Retrieving content of contentEditable cell in table

I’ve created an html table, using html.Table, html.Tr, html.Td, etc. A cell of that table is editable by the user, specified like this:

html.Td(‘40’, contentEditable=‘true’, id='foo)

The cell is in fact editable in the rendered page. But when I pick up the ‘children’ attribute of ‘foo’, it finds the original, pre-edit value.

Is there any way to get the new value from within dash?

I overlooked the obvious here: putting as content dcc.Input() inside the html.Td():

html.Td(dcc.Input(id=‘foo’, value=‘40’, inputmode=‘numeric’, type=‘text’))


i am using a div editable and it does not pickup the children string value in the callback after the edit , any recs why?
d_html.Div('', id='frag_set_editable', contentEditable='true') ?
Textarea does not autoexpand to the content thus i avoid it.

1 Like