[IPython-dev] Ruler on notebook codecells

Kiko kikocorreoso at gmail.com
Fri Oct 24 04:32:01 EDT 2014


2014-10-24 10:28 GMT+02:00 Kiko <kikocorreoso at gmail.com>:

> Hi all,
>
> I've been trying to include a ruler for the code cells with no success.
>
> I am using a modification of the code found here:
> https://www.pfenninger.org/posts/ipython-notebook-extensions-to-ease-day-to-day-work/
>
> My code, included in the custom.js is as follows:
>
> <pre>
> $([IPython.events]).on("app_initialized.NotebookApp", function () {
>     require[("static/components/codemirror/addon/display/rulers")];
>     var rulers = [{column: 79, color: "#333333", lineStyle: "dashed"}];
>     IPython.Cell.options_default.cm_config.rulers = rulers;
>     console.log("Rulers loaded");
> });
> </pre>
>
>
Please, ignore the <pre> tags above :-\


> In the js console I can see that ruler is loaded and in the object
> ("IPython.Cell.options_default.cm_config.rulers") I can see the rulers
> array but in the notebook nothing changed.
>
> Am I doing something wrong?
>
> Thanks in advance.
>
> Kind regards.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141024/97fab9c8/attachment.html>


More information about the IPython-dev mailing list