##// END OF EJS Templates
Basic infrastructure for new texteditor component
Thomas Kluyver -
Show More
@@ -0,0 +1,23 b''
1 // Copyright (c) IPython Development Team.
2 // Distributed under the terms of the Modified BSD License.
3
4 require([
5 'jquery',
6 'base/js/utils',
7 'base/js/page',
8 'codemirror/lib/codemirror',
9 'custom/custom',
10 ], function(
11 $,
12 utils,
13 page,
14 CodeMirror
15 ){
16 page = new page.Page();
17
18 var base_url = utils.get_body_data('baseUrl');
19 var cm_instance = CodeMirror($('#texteditor-container')[0]);
20
21 page.show();
22
23 });
@@ -0,0 +1,23 b''
1 {% extends "page.html" %}
2
3 {% block title %}{{page_title}}{% endblock %}
4
5 {% block params %}
6
7 data-base-url="{{base_url}}"
8
9 {% endblock %}
10
11
12 {% block site %}
13
14 <div id="texteditor-container"></div>
15
16 {% endblock %}
17
18 {% block script %}
19
20 {{super()}}
21
22 <script src="{{ static_url("texteditor/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
23 {% endblock %}
1 NO CONTENT: new file 100644
@@ -0,0 +1,18 b''
1 #encoding: utf-8
2 """Tornado handlers for the terminal emulator."""
3
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
6
7 from tornado import web
8 from ..base.handlers import IPythonHandler, file_path_regex
9
10 class EditorHandler(IPythonHandler):
11 """Render the terminal interface."""
12 @web.authenticated
13 def get(self, path, name):
14 self.write(self.render_template('texteditor.html'))
15
16 default_handlers = [
17 (r"/texteditor%s" % file_path_regex, EditorHandler),
18 ] No newline at end of file
@@ -199,6 +199,7 b' class NotebookWebApplication(web.Application):'
199 199 handlers.extend(load_handlers('notebook.handlers'))
200 200 handlers.extend(load_handlers('nbconvert.handlers'))
201 201 handlers.extend(load_handlers('kernelspecs.handlers'))
202 handlers.extend(load_handlers('texteditor.handlers'))
202 203 handlers.extend(load_handlers('services.config.handlers'))
203 204 handlers.extend(load_handlers('services.kernels.handlers'))
204 205 handlers.extend(load_handlers('services.contents.handlers'))
General Comments 0
You need to be logged in to leave comments. Login now