Ace editor now works with Markdown and HTML cells with proper modes.

This commit is contained in:
Brian Granger 2012-01-19 23:15:48 -08:00
parent 68fe221a29
commit a997e50782
2 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,8 @@ var IPython = (function (IPython) {
var output = text_cell.find("div.text_cell_render");
output.hide();
text_cell.find('div.text_cell_input').show();
// I don't know why I need to do this, but if I don't do
// refresh/focus/refresh, the to_markdown method won't work.
this.code_mirror.refresh();
this.code_mirror.focus();
this.code_mirror.refresh();

View File

@ -176,6 +176,8 @@
<script src="/static/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/ace/mode-python.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/ace/mode-markdown.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/ace/mode-html.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/ace/theme-textmate.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/pagedown/Markdown.Converter.js" charset="utf-8"></script>