I used django-tinymce in my project. The django-tinymce editor is appended on textarea field using "tinyMCE.execCommand('mceAddControl', false, id); " command but the problem is that it does't have image upload functionality from local machine. please suggest me which editor suits in my condition.
Asked
Active
Viewed 791 times
1
-
I resolved the problem using jquery-easyui-1.3.4 and my code as bellowand my script – Pradeep Kumar Nov 13 '13 at 08:16
1 Answers
1
Use jquery-easyui-1.3.4 example is below
<form id="my_form" action="/quiz/upload/" method="post" enctype="multipart/form-data">
{%csrf_token%}
<input id="image" name="image" type="file" /> <input type="submit" value="upload" />
and my script
<script type="text/javascript">
$(function(){ $('#my_form').form({ success:function(data){
tinymce.activeEditor.selection.setContent("<img src='"+data+"' />"); } });
});

Sarfraz Ahmad
- 1,419
- 3
- 15
- 36