Commit 46aaf10d authored by stef's avatar stef

[enh] added tinymce to comment form

parent 01f91674
......@@ -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 %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment