Spell check

This commit is contained in:
Antonino Ingargiola 2015-08-24 09:51:25 -07:00
parent 2a4d70c3a2
commit 8d7dba3f85

View File

@ -1,13 +1,13 @@
`View the original notebook on nbviewer <http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/JavaScript%20Notebook%20Extensions.ipynb>`__
Embrasing web standards
Embracing web standards
=======================
One of the main reason that allowed us to developp the current notebook
web application was to embrase the web technology.
One of the main reason that allowed us to develop the current notebook
web application was to embrace the web technology.
By beeing a pure web application using HTML, Javascript and CSS, the
By being a pure web application using HTML, Javascript and CSS, the
Notebook can get all the web technology improvement for free. Thus, as
browsers support for different media extend, The notebook web app should
be able to be compatible without modification.
@ -25,13 +25,13 @@ web interface.
Tempering with Notebook app
---------------------------
The first tool that is availlable to you and that you shoudl be aware of
are browser "developpers tool". The exact naming can change across
The first tool that is available to you and that you should be aware of
are browser "developers tool". The exact naming can change across
browser, and might require the installation of extensions. But basically
they can allow you to inspect/modify the DOM, and interact with the
javascript code that run the frontend.
- In Chrome and safari Developper tools are in the menu [Put mmenu name
- In Chrome and safari Developer tools are in the menu [Put menu name
in english here]
- In firefox you might need to install
`Firebug <http://getfirebug.com/>`__
@ -46,11 +46,11 @@ Injecting JS
using magics
^^^^^^^^^^^^
Above tools can be tedious to edit long javascipt files. Hopefully we
Above tools can be tedious to edit long javascript files. Hopefully we
provide the ``%%javascript`` magic. This allows you to quickly inject
javascript into the notebook. Still the javascript injected this way
will not survive reloading. Hence it is a good tool for testing an
refinig a script.
refining a script.
You might see here and there people modifying css and injecting js into
notebook by reading file and publishing them into the notebook. Not only
@ -58,7 +58,7 @@ this often break the flow of the notebook and make the re-execution of
the notebook broken, but it also mean that you need to execute those
cells on all the notebook every time you need to update the code.
This can still be usefull in some cases, like the ``%autosave`` magic
This can still be useful in some cases, like the ``%autosave`` magic
that allows to control the time between each save. But this can be
replaced by a Javascript dropdown menu to select save interval.
@ -73,7 +73,7 @@ custom.js
To inject Javascript we provide an entry point: ``custom.js`` that allow
the user to execute and load other resources into the notebook.
Javascript code in ``custom.js`` will be executed when the notebook app
start and can then be used to customise almost anything in the UI and in
start and can then be used to customize almost anything in the UI and in
the behavior of the notebook.
``custom.js`` can be found in the Jupyter dir. You can share your
@ -137,10 +137,10 @@ For the quick ones :
We've seen above that you can change the autosave rate by using a magic.
This is typically something I don't want to type everytime, and that I
don't like to embed into my workwlow and documents. (reader don't care
don't like to embed into my workflow and documents. (reader don't care
what my autosave time is), let's build an extension that allow to do it.
Create a dropdow elemement in the toolbar (DOM
Create a dropdown element in the toolbar (DOM
``Jupyter.toolbar.element``), you will need
- ``IPython.notebook.set_autosave_interval(miliseconds)``
@ -224,7 +224,7 @@ and browse http://127.0.0.1:3000 to get docs
Some convenience methods
^^^^^^^^^^^^^^^^^^^^^^^^
By browsing the doc you will see that we have soem convenience methods
By browsing the doc you will see that we have some convenience methods
that avoid to re-invent the UI everytime :
.. code:: javascript
@ -246,10 +246,10 @@ select from.
Cell Metadata
-------------
The most requested feature is generaly to be able to distinguish
individual cell in th enotebook, or run specific action with them. To do
The most requested feature is generally to be able to distinguish
individual cell in the notebook, or run specific action with them. To do
so, you can either use ``Jupyter.notebook.get_selected_cell()``, or rely
on ``CellToolbar``. This allow you to register aset of action and
on ``CellToolbar``. This allow you to register asset of action and
graphical element that will be attached on individual cells.
Cell Toolbar
@ -262,7 +262,7 @@ Default allow edit the metadata attached to each cell manually.
First we define a function that takes at first parameter an element on
the DOM in which to inject UI element. Second element will be the cell
this element will be registerd with. Then we will need to register that
this element will be registered with. Then we will need to register that
function ad give it a name.
Register a callback
@ -330,7 +330,7 @@ notebooks.
``require`` is provided by a `javascript
library <http://requirejs.org/>`__ that allow to express dependency. For
simple extension like the previous one we directly mute the global
namespace, but for more complexe extension you could pass acallback to
namespace, but for more complex extension you could pass a callback to
``require([...], <callback>)`` call, to allow the user to pass
configuration information to your plugin.
@ -379,7 +379,7 @@ It should be able to take the 4 following values :
- ``Medium``
- ``Hard``
We will use it to customise the output of the converted notebook
We will use it to customize the output of the converted notebook
depending of the tag on each cell
.. code:: python