[IPython-dev] CodeMirror overlay for spell checking

Damián Avila damianavila at gmail.com
Thu Jul 24 14:31:40 EDT 2014


> I'm interested to see the code.

Me too ;-)


2014-07-24 15:30 GMT-03:00 Matthias Bussonnier <bussonniermatthias at gmail.com
>:

>
> Le 24 juil. 2014 à 19:06, Doug Blank a écrit :
>
> > I have successfully created and registered a CodeMirror overlay (for
> spell checking), but two questions:
> >
> > 1) Which of the modes is used for Markdown cells? I guess that will be
> the mode that I overlay.
>
> JSconsole :
>
> > IPython.TextCell.options_default.cm_config.mode
> "htmlmixed"
>
>
>
> >
> > 2) How do I make it so that my new mode will be used on Markdown cells?
>
> IPython.TextCell.options_default.cm_config.mode = yourmode
> +
> loop on all cell and set
> IPython.notebook.get_cell(0).code_mirror.setOption('mode',yourmode)
>
> might need to require your mode first though, maybe with
> code_mirrorm.getMode
>
> cf julia custom.js
>
> https://github.com/JuliaLang/IJulia.jl/blob/master/deps/custom.js#L66-L90
>
> >
> > I guess that I need to associate the mime type of Markdown cells with my
> new mode, but having some trouble finding where to connect this in the
> IPython JavaScript.
>
> I'm interested to see the code.
> --
> M
>
> >
> > Thanks for any suggestions,
> >
> > -Doug
> >
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



-- 
*Damián*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140724/93bc4a7f/attachment.html>


More information about the IPython-dev mailing list