Extension that write in cell (jupyterlab4)

I need to migrate extension code from jupyterlab3 to jupyterlab4, but I don’t manage to adapt this code:

In jupyterlab4, activecell no longer has the property ‘value’

I tried with activeCell.editor but I can’t find how to do it.

Regards

2 Likes

I changed to

activeCell.model.sharedModel.setSource('a = 2\na');

it seems to work

2 Likes