[IPython-dev] New cells are not highlighted

Denis Pinsard denis.pinsard at dichotomies.fr
Fri Jul 31 16:17:01 EDT 2015


I use the IOCaml Kernel with Jupyter.
When I load a Notebook the code is correctly highlighted but when I
create a new cell, the code of this cell is not highlighted.
I have found that the issue comes from the cell.cm_config.mode parameter.
When the notebook is loaded, the mode is 'text/x-ocaml' and it works,
but when a cell is created the parameter received the value 'ocaml'
which is not correctly interpreted by Codemirror.
I work around the issue by adding cell.cm_config.mode = 'text/x-ocaml'
on create.Cell event in my custom.js.
It works but this way to modify the parameter seems to be deprecated.
What is the good manner ?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150731/db069a9b/attachment.sig>


More information about the IPython-dev mailing list