Changes between Version 5 and Version 6 of AddDojoEditor
- Timestamp:
- Jun 4, 2006, 3:27:06 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AddDojoEditor
v5 v6 1 1 = Add Dojo Editor = 2 2 3 This document describes how to add the Dojo Rich Text Editor (Editor2) to the Django Admin-Interface. 4 5 == Install Dojo == 6 3 7 Download [http://www.dojotoolkit.org Dojo] (kitchen sink) and install it on your webserver in /media/dojo/... 8 9 == Add the javascript for loading the Editor == 4 10 5 11 Save the following script as !AddRichTextEditing.js into /media/js/admin/ … … 25 31 This script looks for the help text "Rich Text Editing." and replaces the associated textarea with the Dojo-Editor. I´m using Editor2, because it´s loading much faster than Editor. 26 32 27 Define your model like this: 33 == Define the models == 34 35 Define your model like this (if you change the help_text make sure to change it in !AddRichTextEditing.js also): 28 36 29 37 {{{ … … 40 48 41 49 [http://www.vonautomatisch.at/django/dojoeditor.jpg Screenshot (Preview)] 50 51 == Some restrictions == 52 53 * doesn´t work with Safari 54 * having multiple Editors on one site needs proper testing (especially if you want to share the toolbar) 55 56 == Hints == 57 58 * Usually, the area for Rich Text Editing stretches vertically when adding content - if you want to have a scrollbar instead, set the "height" in /src/widget/RichText.js. 59 * You may want to change the styles in order to integrate the RTE: use /src/widget/templates/HtmlEditorToolbar.css - be aware that these styles may clash with the django-styles. 60 61 == Help == 62 63 * some examples can be found in the [http://archive.dojotoolkit.org/ Dojo Nighlty builds]. 64