jupyter / jupyter-js-notebook

JupyterLab notebook
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

How do jupyter notebook be embeded in html ? #235

Open saliormoon opened 7 years ago

saliormoon commented 7 years ago

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.

blink1073 commented 7 years ago

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

saliormoon commented 7 years ago

ok, thank you very much.

saliormoon commented 7 years ago

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.

blink1073 commented 7 years ago

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.

saliormoon commented 7 years ago

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.

blink1073 commented 7 years ago

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

saliormoon commented 7 years ago

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

blink1073 commented 7 years ago

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
saliormoon commented 7 years ago

Ok, thanks very much, @blink1073 .

aoxiangcao commented 7 years ago

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

blink1073 commented 7 years ago

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