|
List Info
Thread: dojo
|
|
| dojo |

|
2006-05-18 07:06:21 |
hi all
I am using magic removal
i need to use text widget in my admin interface so can
anyone tell me
how i could do this
Thanks,
Mary
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-18 09:02:59 |
I use TinyMCE which is very good.
There is an how-to in the Wiki at
http://code.djangoproject.com/wiki/CookBookAdminTools
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-18 11:07:42 |
i guess you mean the editor widget:
1. drop dojo (kitchen sink) into /media/ (like /media/dojo)
2. add this script as AddRichTextEditing.js into
/media/js/admin/
### this script looks for the help text "Rich Text
Editing" and
replaces the textarea before with the dojo widget
var AddEditor = {
init: function() {
var helptext = document.getElementsByTagName('p');
for (var i = 0, ht; ht = helptext[i]; i++) {
if (ht.firstChild.data == "Rich Text
Editing.") {
ht.previousSibling.previousSibling.setAttribute("dojoT
ype",
"Editor");
}
}
},
}
addEvent(window, 'load', AddEditor.init);
3. in change_form.html add the dojo js to block extrahead
(it should
look like this):
{% block extrahead %}{{ block.super }}
<script type="text/javascript"
src="../../../jsi18n/"></script>
{% for js in javascript_imports %}{% include_admin_script js
%}{%
endfor %}
<script type="text/javascript"
src="/media/dojo/dojo.js"></script>
<script type="text/javascript">
dojo.require("dojo.widget.Editor");
</script>
{% endblock %}
### i donīt know why, but the dojo-js has to be included
AFTER the
admin-scripts
### itīd be cool to integrate this into
AddRichTextEditing.js (but i
donīt know how ...)
4. in your models, define the areas for richtext editing
like this:
class Blog(models.Model):
body = models.TextField('Body', help_text='Rich Text
Editing.',
blank=True, null=True)
class Admin:
js = ['js/admin/AddRichTextEditingDirectly.js']
thatīs it. if there are any further questions, donīt
hesitate to ask.
additionally, you might wanna change the widget styles
(dojo/src/
widget/templates/HTMLEditorToolbar.css):
add margin-left: 110px to EditorToolbarSmallBg
add this:
.RichTextEditable {
margin-left: 110px;
}
with changing the styles a bit more, the whole thing might
look like
this:
ht
tp://www.vonautomatisch.at/django/dojoeditor.jpg
patrick
Am 18.05.2006 um 09:06 schrieb Mary Adel:
>
> hi all
> I am using magic removal
> i need to use text widget in my admin interface so can
anyone tell me
> how i could do this
>
> Thanks,
> Mary
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-18 12:29:58 |
just found out an easier way:
forget nr. 3 and change AddRichTextEditing.js to this:
document.write('<script
type="text/javascript" src="/media/dojo/
dojo.js"></script>');
document.write('<script
type="text/javascript">dojo.require
("dojo.widget.Editor2");</script>');
var AddEditor = {
init: function() {
var helptext = document.getElementsByTagName('p');
for (var i = 0, ht; ht = helptext[i]; i++) {
if (ht.firstChild.data == "Rich Text
Editing.") {
ht.previousSibling.previousSibling.setAttribute("dojoT
ype",
"Editor2");
}
}
},
}
addEvent(window, 'load', AddEditor.init);
btw, iīve tested this with m-r on Firefox 1.5.
patrick
Am 18.05.2006 um 13:07 schrieb va:patrick.kranzlmueller:
>
> i guess you mean the editor widget:
>
> 1. drop dojo (kitchen sink) into /media/ (like
/media/dojo)
> 2. add this script as AddRichTextEditing.js into
/media/js/admin/
> ### this script looks for the help text "Rich
Text Editing" and
> replaces the textarea before with the dojo widget
>
> var AddEditor = {
> init: function() {
> var helptext = document.getElementsByTagName('p');
> for (var i = 0, ht; ht = helptext[i]; i++) {
> if (ht.firstChild.data == "Rich Text
Editing.") {
>
ht.previousSibling.previousSibling.setAttribute("dojoT
ype",
> "Editor");
> }
> }
> },
> }
> addEvent(window, 'load', AddEditor.init);
>
> 3. in change_form.html add the dojo js to block
extrahead (it should
> look like this):
>
> {% block extrahead %}{{ block.super }}
> <script type="text/javascript"
src="../../../jsi18n/"></script>
> {% for js in javascript_imports %}{%
include_admin_script js %}{%
> endfor %}
> <script type="text/javascript"
src="/media/dojo/dojo.js"></script>
> <script type="text/javascript">
> dojo.require("dojo.widget.Editor");
> </script>
> {% endblock %}
>
> ### i donīt know why, but the dojo-js has to be
included AFTER the
> admin-scripts
> ### itīd be cool to integrate this into
AddRichTextEditing.js (but i
> donīt know how ...)
>
> 4. in your models, define the areas for richtext
editing like this:
>
> class Blog(models.Model):
> body = models.TextField('Body', help_text='Rich
Text Editing.',
> blank=True, null=True)
> class Admin:
> js =
['js/admin/AddRichTextEditingDirectly.js']
>
>
> thatīs it. if there are any further questions, donīt
hesitate to ask.
>
> additionally, you might wanna change the widget styles
(dojo/src/
> widget/templates/HTMLEditorToolbar.css):
>
> add margin-left: 110px to EditorToolbarSmallBg
> add this:
> .RichTextEditable {
> margin-left: 110px;
> }
>
> with changing the styles a bit more, the whole thing
might look like
> this:
> ht
tp://www.vonautomatisch.at/django/dojoeditor.jpg
>
> patrick
>
>
>
> Am 18.05.2006 um 09:06 schrieb Mary Adel:
>
>>
>> hi all
>> I am using magic removal
>> i need to use text widget in my admin interface so
can anyone tell me
>> how i could do this
>>
>> Thanks,
>> Mary
>>
>>
>>>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-18 18:29:37 |
You should add these dojo info to the cookbook mentioned
above.
http://code.djangoproject.com/wiki/CookBookAdminTools
--
lpc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-19 09:50:24 |
i still have to do some testing with different browsers.
after that, i will add the script/manual to the wiki.
patrick
Am 18.05.2006 um 20:29 schrieb lcaamano:
>
> You should add these dojo info to the cookbook
mentioned above.
>
> http://code.djangoproject.com/wiki/CookBookAdminTools
>
> --
> lpc
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| dojo |

|
2006-05-31 19:10:34 |
done ...
see
http
://code.djangoproject.com/wiki/AddDojoEditor
patrick
Am 18.05.2006 um 20:29 schrieb lcaamano:
>
> You should add these dojo info to the cookbook
mentioned above.
>
> http://code.djangoproject.com/wiki/CookBookAdminTools
>
> --
> lpc
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
[1-7]
|
|