If you use third party wysiwyg editor app, you should follow its manual.
If you would like to use save horizontal space, you should use full-width fieldset class with your wysiwyg editor.
We tested many existing wysiwyg apps, but many of them were missing tests, had implementation or other flaws, so we decided to create our own. We are maintaining two simple wysiwyg apps for Imperavi Redactor and CKEditor.
Right now they doesn’t support any uploads or anything with Django urls related, however it is planned to improve and update these packages in future.
These packages are independent and Django Suit isn’t requirement.
Install:
Usage:
from django.forms import ModelForm
from django.contrib.admin import ModelAdmin
from suit_redactor.widgets import RedactorWidget
class PageForm(ModelForm):
class Meta:
widgets = {
'name': RedactorWidget(editor_options={'lang': 'en'})
}
class PageAdmin(ModelAdmin):
form = PageForm
fieldsets = [
('Body', {'classes': ('full-width',), 'fields': ('body',)})
]
...
admin.site.register(Page, PageAdmin)
Preview:
Install:
Usage for CKEditor is the same as for Imperavi Redactor, just change RedactorWidget to CKEditorWidget:
from django.forms import ModelForm
from django.contrib.admin import ModelAdmin
from suit_ckeditor.widgets import CKEditorWidget
class PageForm(ModelForm):
class Meta:
widgets = {
'name': CKEditorWidget(editor_options={'startupFocus': True})
}
class PageAdmin(ModelAdmin):
form = PageForm
fieldsets = [
('Body', {'classes': ('full-width',), 'fields': ('body',)})
]
...
admin.site.register(Page, PageAdmin)
Preview:
Also you can integrate WYSIWYG editor using any other third party apps.
Few third party apps we tested for Django Suit: