n-riesco / ijavascript

IJavascript is a javascript kernel for the Jupyter notebook
Other
2.18k stars 187 forks source link

can I define magics like under IPython ? #236

Closed parmentelat closed 3 years ago

parmentelat commented 3 years ago

it's all in the title I guess, I could use the ability to define what IPython supports as %%mymagic (my use case is about cell magics)

specifically I'd like to be able to write in one cell some html, css and/or js - with some sort of separators - and embed on the fly a codepen based on that

n-riesco commented 3 years ago

I don't support the use of magics because they break Javascript sysntax. In my opinion, they don't belong in a language-agnostic protocol as Jupyter's. See #43 for discussion.

@apowers313 has developed an npm package to support them. See:

Please, continue the discussion n #43.

parmentelat commented 3 years ago

thanks for the link to magicpatch which seems to be exactly what I need !