Bring all the functionality of the Wysihtml5 rich text editor to your Django project.
Django-Wysihtml5 widget in action. Look at the Wysihtml5 site to know more.
See the list of features provided with the Wysihtml5 rich text editor.
The app has no extra dependency. The Wysihtml5 code is included with the app. Just clone the repository or install it from PyPI, then:
wysihtml5 to INSTALLED_APPS in your settings module.Wysihtml5TextField.wysihtml5.admin.AdminWysihtml5TextFieldMixin and Django's admin.ModelAdmin.There's a demo site in the sources that you can use to see the app in action. It's just a simple example of an Article model with two TextFields: abstract and body. The body field uses the Wysihtml5 editor while the abstract uses the regular Django TextArea widget. The demo has no bells and whistles, it's as simple as it can be to illustrate the basic functionality of the plugin.
The steps to quickly install the demo site:
cd django-wysihtml5/example/demopython manage.py syncdb --noinput (user: admin, pwd: admin)python manage.py runserverYou can customize two commands: Create Link Insert Image
To customize each command create a function to render the dialog and the javascript code to handle the result. Visit the commands wiki pages (createLink, insertImage) to see how.
Once you have the function edit your settings file and declare the key that corresponds with the command you have customize. The default values are:
WYSIHTML5_FUNC_CREATE_LINK_DIALOG = "wysihtml5.widgets.render_create_link_dialog"WYSIHTML5_FUNC_INSERT_IMAGE_DIALOG = "wysihtml5.widgets.render_insert_image_dialog"Drop a comment, or contact me.
w send your comment