Custom Cell Execute Method

Hi All,

I am requesting your inputs / directions on achieving below.

I have a cell with XML / JSON data. And I would like to submit these XML / JSON to my backend REST API, when cell is “executed”.

I think I can create a cell with specific meta data, like metadata.type = “xml”, and override cell execute method if type is “xml” and call backend REST API.

Please let me know if this is correct approach or any feel free to share better one. Also, if you can provide some links / example / reference to override cell execute method.

Looking forward to hear back from you.

Best regards,
Jigar.

This is an example of inspecting the metadata of a cell and injecting code into the cell given some criteria, which I thought might be helpful: etc_jupyterlab_code_injection_example/index.ts at f1d455cfad2a9b9d327e87ab6b34167247551868 · educational-technology-collective/etc_jupyterlab_code_injection_example · GitHub

Hi @adpatter ,

Thank you for your reply. Appreciate it.

Let me try this approach, and will get back to you.

Best regards,
Jigar.