mazelife / django-redactor Goto Github PK
View Code? Open in Web Editor NEWProject has been forked & renamed! See the README. Integrates the Redactor Javascript WYSIWYG editor in Django.
License: Other
Project has been forked & renamed! See the README. Integrates the Redactor Javascript WYSIWYG editor in Django.
License: Other
Tests should be simple: just ensure that widget renders as expected.
Hi there,
I'm having a bit of trouble getting the Redactor Editor to look good on the Admin site. Currently, the Django form labels are floated left, which is causing the Redactor box to overlap them and make the page look broken. I'm aware I could just add some custom CSS to fix this issue (a clear:left on the redactor box with a bit of positioning to create some space between the form field title and the box itself should do the trick, but I'm wondering if there is a way to do this via the settings that I am unaware of, such that I don't have to introduce custom code, as I plan on utilizing this on a number of sites.
Let me know, thanks!
Looks like a fantastic project. However, you indicate that django-redactor is licensed under CC-Attribution/NonCommercial. You note that this is because the underlying Redactor platform is licensed under the same license. So, on one hand, that was the right move, since you can't unrestrict the included code. On the other hand, redactor also licenses their code under a separate, developer license for commercial and open-source uses; but, without an explicit waiver from you, we're stuck with the CC non-commercial license on any usages of your project even if we purchase an unrestricted (or less restricted) license from Redactor.js.
I wonder if you would consider alternative licensing language that incorporate the noncommercial license out of the box, but which would make your software available for commercial or less-restricted open-source projects, if the user has a proper redactor license. I thought I'd check first before I spent brain cells on any specific suggestions of how that could be achieved, although they would be quite simple.
(Or maybe you think the web should only be used for non-commercial purposes, in which case, that's your right, and you've chosen a great license for that! :) )
Sources: I'm a reformed IP attorney, turned web-hacker. :)
Great project, is there currently a way to activate plugins? Is there any chance they could be included?
Hi,
I use your app, but I got a problem setting custom css. In fact, due to the way redactor.min.js work, it adds : + this.opts.path + '/css/' before the this.opts.css at this point : https://github.com/mazelife/django-redactor/blob/master/redactor/static/django-redactor/redactor/redactor.js#L816
so that, I think (because I tried and didn't succeed) that this feature is kind of broken.
If I remove + this.opts.path + '/css/' from this line, it works fine. From there, all the code here https://github.com/mazelife/django-redactor/blob/master/redactor/widgets.py#L91 is more or less broken: it would work if redactor.js doesn't add it own prefix to css.
Don't know if there is a good way to work around this path problem.
Regards,
I could not get the admin functionality to work with the current documentation:
class MyAdmin(admin.ModelAdmin):
formfield_overrides = {
'widget': AdminRedactorEditor()
}
}
However, this did work:
from django.db import models
from django.contrib import admin
from redactor.widgets import AdminRedactorEditor
from myapp.models import MyModel
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField:{'widget': AdminRedactorEditor},
}
admin.site.register(MyModel, MyModelAdmin)
Perhaps more explicit documentation would be helpful.
Thanks.
Hi,
Thanks for your work on this. I'm having a small issue using django-redactor. When I save something using the AdminRedactorEditor widget that consists of something like this:
< p >bla bla bla< /p >
< b r>
< pre >#!/bin/bash
echo this is code
< /pre >
< p >more text< /p >
the part after < /pre > doesn't get saved. Do you have any idea why?
thanks,
Léon
It would be great if this package would be listed in PyPI, and installable with pip.
The setup.py
is already there.
The only problem I see with this is that the name is already taken: http://pypi.python.org/pypi/django-redactor/ :(
Hi,
Wondering if Django Redactor has any sort of a code formatting option that I am overlooking? We have certain clients that have had issues with text changing randomly, and they would prefer to have an option to remove all code Redactor adds automatically.
I tried the following to see if we could just disable automatic formatting and let people write their own HTML, but this didn't work:
widgets = {
'tease':AdminRedactorEditor(redactor_settings={'autoformat': False }),
'image_override':Textarea(),
'tags':TagAutocomplete(),
}
Any ideas? If the option doesn't exist or is deprecated, we could try to create our own custom solution.
Hi @mazelife,
is there a way to add dropdown buttons with custom actions (javascript function callback) like this http://imperavi.com/redactor/examples/dropdown/ ???
I was trying, but i'm not able to write a javascript function inside python code only if they are in string mode :(
Thanks
Gives error:
cannot import name RedactorEditor
However, it installs without any issues directly from GitHub
pip install -e git+https://github.com/mazelife/django-redactor.git#egg=redactor
Would be good to make a note about including the needed javascript and css files somewhere in a specific template or base template.
For the admin widget this is taken care of.
nice plugin none the less.
Hi,
First thank for this great plugin, i really liked it.
Now i would like to set the lang to 'fr' but in order to do that i must include the language file but i can't do that in the django back-office ... How can i do it ? Maybe your widget need a new argument with the path of this language file...
Thank in advance for your response.
Has anyone tried updating to newer versions of redactor.js successfully?
Redactor.js is currently in Version 9.0.4.
Dear all,
I have problems using the spanish translation. Redactor stops working when I set other language.
I have detected that the translation files included in redactor / static / django-redactor / redactor / langs are obsolete, as I think that they are from an older redactor version.
I have tried using some of the files from the curent version. You can find those there:
http://imperavi.com/redactor/docs/languages/
When you replace the translations with these files, it works ok.
Regards,
If you use Django admin, normally you already have jquery. Using AdminRedactorEditor imports jquery once again, which breaks every jQuery plugin on the page.
If image name contains russian chars (тест.jpg) we get error UnicodeEncodeError at /redactor/upload/image/ 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.