Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
46aaf10d
Commit
46aaf10d
authored
Oct 19, 2011
by
stef
Browse files
[enh] added tinymce to comment form
parent
01f91674
Changes
1
Hide whitespace changes
Inline
Side-by-side
templates/view.html
View file @
46aaf10d
...
...
@@ -6,6 +6,7 @@
{% endblock %}
{% block scripts %}
<script
type=
"text/javascript"
src=
"{%media_url%}/js/jquery.1.4.2.min.js"
></script>
<script
type=
"text/javascript"
src=
"{%media_url%}/js/tinymce/tiny_mce.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
function
bindPostCommentHandler
()
{
$
(
'
.toggle
'
).
click
(
function
(){
...
...
@@ -46,6 +47,29 @@ $(document).ready(function() {
}
return
false
;
});
tinyMCE
.
init
({
mode
:
"
textareas
"
,
width
:
"
400
"
,
height
:
"
300
"
,
theme
:
"
advanced
"
,
theme_advanced_toolbar_align
:
"
left
"
,
theme_advanced_toolbar_location
:
"
top
"
,
//theme_advanced_buttons1 : "bold,italic,underline,bullist,numlist,outdent,indent,blockquote,undo,",
theme_advanced_buttons1
:
""
,
theme_advanced_buttons2
:
""
,
theme_advanced_buttons3
:
""
,
plugins
:
"
paste
"
,
paste_auto_cleanup_on_paste
:
true
,
paste_strip_class_attributes
:
'
all
'
,
paste_remove_styles
:
true
,
//init_instance_callback: focushandlers,
valid_elements
:
"
@[id|title|dir<ltr?rtl|lang|xml::lang],a[rel|rev|
"
+
"
charset|hreflang|name|href|title],strong/b,em/i,
"
+
"
strike,u,p,-ol,-ul,-li,br,-sub,-sup,-blockquote,
"
+
"
,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,
"
+
"
-h6,hr[size|noshade],dd,dl,dt,cite,abbr,acronym,
"
+
"
del[datetime|cite],ins[datetime|cite]
"
,
});
});
</script>
{% endblock %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment