8 <script src="http://cdn.ravenjs.com/1.1.3/jquery,native/raven.min.js"></script>
10 Raven.config('{{RAVEN_CONFIG.SENTRY_URL}}', {{RAVEN_CONFIG.SETTINGS|default:'{}'}}).install();
13 name: '{{request.user.username}}',
14 email: '{{request.user.email}}',
15 id: {{request.user.id}}
20 <script src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
21 <script src="http://cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/ace.js" type="text/javascript" charset="utf-8"></script>
24 <link rel="stylesheet/less" type="text/css" href="{% static 'wiki/editor/src/editor/styles/main.less' %}"/>
25 <script type="text/javascript">less = {relativeUrls: true};</script>
26 <script src="{% static 'wiki/editor/libs/less-1.3.3.min.js' %}"></script>
27 <script src="{% static 'wiki/editor/libs/require.js' %}" data-main="{% static 'wiki/editor/src/editor/entrypoint.js' %}" ></script>
29 <link href="{% static 'wiki/build/rng.css' %}" rel="stylesheet">
30 <script src="{% static 'wiki/build/rng.js' %}"></script>
34 <script type="text/javascript">
37 rootSelector: '#editor_root',
38 jsonifySentPayload: false,
55 handlers: ['sentry', 'console']
60 documentSaveUrl: function(id) { return '/editor/text/' + id + '/'; },
61 documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'},
62 documentDiffUrl: function(id) { return '/editor/diff/' + id + '/'; },
63 documentRestoreUrl: function(id) { return '/editor/revert/' + id + '/'},
67 {label: '{{forms.text_save.comment.label}}', name: '{{forms.text_save.comment.html_name}}', type: 'textarea'},
68 {label: '{{forms.text_save.stage_completed.label}}', name: '{{forms.text_save.stage_completed.html_name}}', type: 'select', options: [
69 {% for value,text in tags %}
70 {value:'{{value|default:''}}', text:'{{text}}'} {% if not forloop.last %}, {% endif %}
72 ], description: '{{forms.text_save.stage_completed.help_text}}'},
74 content_field_name: '{{forms.text_save.text.html_name}}',
75 version_field_name: '{{forms.text_save.parent_revision.html_name}}'
78 documentRestoreForm: {
80 {label: '{{forms.text_revert.comment.label}}', name: '{{forms.text_revert.comment.html_name}}', type: 'textarea'}
82 version_field_name: '{{forms.text_revert.revision.html_name}}'
87 config.documentSaveForm.fields.push(
88 {label: '{{forms.text_save.publishable.label}}', name: '{{forms.text_save.publishable.html_name}}', type: 'checkbox', description: '{{forms.text_save.publishable.help_text}}'}
92 {% if not request.user.is_authenticated %}
93 config.documentSaveForm.fields.push(
94 {label: '{{forms.text_save.author_name.label}}', name: '{{forms.text_save.author_name.html_name}}', type: 'input', description: '{{forms.text_save.author_name.help_text}}'},
95 {label: '{{forms.text_save.author_email.label}}', name: '{{forms.text_save.author_email.html_name}}', type: 'input', description: '{{forms.text_save.author_email.help_text}}'}
98 config.documentRestoreForm.fields.push(
99 {label: '{{forms.text_revert.author_name.label}}', name: '{{forms.text_revert.author_name.html_name}}', type: 'input', description: '{{forms.text_revert.author_name.help_text}}'},
100 {label: '{{forms.text_revert.author_email.label}}', name: '{{forms.text_revert.author_email.html_name}}', type: 'input', description: '{{forms.text_revert.author_email.help_text}}'}
105 var data = {{serialized_document_data}},
106 templates = {{serialized_templates}}
109 var editor_init = function(Editor) {
110 Editor.setBootstrappedData('data', data);
111 Editor.setBootstrappedData('documentToolbar', templates);
112 Editor.start(config);
115 <div id="editor_root"></div>