Notebook templates #1964
-
I have a few different notebooks with prefilled cells that include code and formatting. Rather than opening them every time and then renaming them, I would like to put together a small package to do this, namely [PlutoTemplates.jl[(). I gave it a shot but I'm quickly finding out I'm not sure how to do this cleanly. I just want upon Just curious if anyone else is thinking about this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I also wanted a way to inject cells into a notebook quite a while back. I do not think you can inject cells into the notebook simply during the loading phase of the package. A not so drastic workaround to that would be to define in your package an initialization function (that you have to call yourself inside a separate cell) that outputs some javascript code to do what you want. You can add, populate and execute cells from the frontend using javascript, I do not think you can do that from the julia side as a package outside of Pluto. |
Beta Was this translation helpful? Give feedback.
I also wanted a way to inject cells into a notebook quite a while back. I do not think you can inject cells into the notebook simply during the loading phase of the package. A not so drastic workaround to that would be to define in your package an initialization function (that you have to call yourself inside a separate cell) that outputs some javascript code to do what you want.
You can add, populate and execute cells from the frontend using javascript, I do not think you can do that from the julia side as a package outside of Pluto.