8 <script src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
9 <script src="http://cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/ace.js" type="text/javascript" charset="utf-8"></script>
12 <link rel="stylesheet/less" type="text/css" href="{% static 'wiki/editor/src/editor/styles/main.less' %}"/>
13 <script type="text/javascript">less = {relativeUrls: true};</script>
14 <script src="{% static 'wiki/editor/libs/less-1.3.3.min.js' %}"></script>
15 <script src="{% static 'wiki/editor/libs/require.js' %}" data-main="{% static 'wiki/editor/src/editor/entrypoint.js' %}" ></script>
17 <link href="{% static 'wiki/build/rng.css' %}" rel="stylesheet">
18 <script src="{% static 'wiki/build/rng.js' %}"></script>
22 <script type="text/javascript">
25 rootSelector: '#editor_root',
26 jsonifySentPayload: false,
28 documentSaveUrl: function(id) { return '/editor/text/' + id + '/'; },
29 documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'},
30 documentDiffUrl: function(id) { return '/editor/diff/' + id + '/'; },
31 documentRestoreUrl: function(id) { return '/editor/revert/' + id + '/'},
35 {label: '{{forms.text_save.comment.label}}', name: '{{forms.text_save.comment.html_name}}', type: 'textarea'},
36 {label: '{{forms.text_save.stage_completed.label}}', name: '{{forms.text_save.stage_completed.html_name}}', type: 'select', options: [
37 {% for value,text in tags %}
38 {value:'{{value|default:''}}', text:'{{text}}'} {% if not forloop.last %}, {% endif %}
40 ], description: '{{forms.text_save.stage_completed.help_text}}'},
42 content_field_name: '{{forms.text_save.text.html_name}}',
43 version_field_name: '{{forms.text_save.parent_revision.html_name}}'
46 documentRestoreForm: {
48 {label: '{{forms.text_revert.comment.label}}', name: '{{forms.text_revert.comment.html_name}}', type: 'textarea'}
50 version_field_name: '{{forms.text_revert.revision.html_name}}'
55 config.documentSaveForm.fields.push(
56 {label: '{{forms.text_save.publishable.label}}', name: '{{forms.text_save.publishable.html_name}}', type: 'checkbox', description: '{{forms.text_save.publishable.help_text}}'}
60 {% if not request.user.is_authenticated %}
61 config.documentSaveForm.fields.push(
62 {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}}'},
63 {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}}'}
66 config.documentRevertForm.fields.push(
67 {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}}'},
68 {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}}'}
73 var data = {{serialized_document_data}},
74 templates = {{serialized_templates}}
77 var editor_init = function(Editor) {
78 Editor.setBootstrappedData('data', data);
79 Editor.setBootstrappedData('documentToolbar', templates);
83 <div id="editor_root"></div>