jupyter-js-notebook icon indicating copy to clipboard operation
jupyter-js-notebook copied to clipboard

How do jupyter notebook be embeded in html ?

Open saliormoon opened this issue 9 years ago • 11 comments

I want to use jupyter-js-notebook to write and run codes, can anyone give me any suggestions about how to do this? High appreciation.

saliormoon avatar Nov 08 '16 03:11 saliormoon

Hi @saliormoon, we have moved this development to JupyterLab. We have an example here.

blink1073 avatar Nov 08 '16 05:11 blink1073

ok, thank you very much.

saliormoon avatar Nov 08 '16 06:11 saliormoon

Yeah, jupyter notebook can load js or css after installed. But now I have a html and I want to use jupyter notebook in this html to achieve the goal that one can write and run codes in the html.

saliormoon avatar Nov 08 '16 07:11 saliormoon

Hi @saliormoon, is your intent to use a custom version of the Jupyter Notebook in another application, or to output html into a standard Jupyter Notebook? If it is the latter, you can use the %%html magic provided by the default python kernel.

blink1073 avatar Nov 08 '16 19:11 blink1073

Thank you, @blink1073. Yeah, I want to use a custom version of the Jupyter Notebook in another application, like html. There is a html page, and I want to embedded Jupyter Notebook in it to write and run my own codes and return the results in the html, just like http://139.196.209.143/try/plugin.php.

saliormoon avatar Nov 09 '16 02:11 saliormoon

Great, then the example linked above and the %%html magic should do what you want.

blink1073 avatar Nov 09 '16 05:11 blink1073

Ok, thank you much. And is there any example of %%html magic?

saliormoon avatar Nov 09 '16 09:11 saliormoon

Here is an example (note that it prints to the JavaScript console of the browser.

screen shot 2016-11-10 at 9 32 18 am

blink1073 avatar Nov 10 '16 17:11 blink1073

Ok, thanks very much, @blink1073 .

saliormoon avatar Nov 11 '16 06:11 saliormoon

hi,i'm doing the same thing just like you @saliormoon , i want to use jupyter in my web application, just like kaggle did. https://www.kaggle.com/artsiomrylau/d/ludobenistant/hr-analytics/human-resources-analytics-notebook so ,what i should do? thanks a lot @blink1073

aoxiangcao avatar Feb 11 '17 05:02 aoxiangcao

Hi @aoxiangcao, this example is still the best place to start.

blink1073 avatar Feb 11 '17 11:02 blink1073