0.7.12
richedit sets
This commit is contained in:
@@ -118,6 +118,9 @@ def init_formfield_for_dbfield(class_model, self, db_field, request, **kwargs):
|
||||
if db_field.name in ['question', 'FAQ_title']:
|
||||
formfield.widget = admin.widgets.AdminTextInputWidget(attrs={'style': 'width: 80%'})
|
||||
|
||||
# if db_field.name in ['text']:
|
||||
# formfield.widget.attrs.update({'style': 'width: 80%'})
|
||||
|
||||
if formfield and formfield.widget:
|
||||
# if type(formfield.widget) in (admin.widgets.AdminSplitDateTime, ):
|
||||
# formfield.widget.attrs.update({'style': 'width: 400px'})
|
||||
|
||||
@@ -220,13 +220,36 @@ CKEDITOR_JQUERY_URL = 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery
|
||||
|
||||
CKEDITOR_CONFIGS = {
|
||||
'default': {
|
||||
'height': 291,
|
||||
'width': '89vw',
|
||||
# 'filebrowserWindowHeight': 600,
|
||||
# 'filebrowserWindowWidth': "100%",
|
||||
'toolbar': 'Custom',
|
||||
'forcePasteAsPlainText': True,
|
||||
# 'toolbar_Custom': [
|
||||
# ['Bold', 'Italic', 'Underline'],
|
||||
# ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
||||
# ['Link', 'Unlink'],
|
||||
# ['RemoveFormat', 'Source']
|
||||
# ],
|
||||
'toolbar_Custom': [
|
||||
['Bold', 'Italic', 'Underline'],
|
||||
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
||||
['Link', 'Unlink'],
|
||||
['RemoveFormat', 'Source']
|
||||
]
|
||||
{'name': 'document', 'items': ['Source', '-', 'Save', '-', 'Find', 'Replace', '-', 'SelectAll']},
|
||||
{'name': 'clipboard', 'items': ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', '-', 'Maximize', 'ShowBlocks']},
|
||||
# {'name': 'forms',
|
||||
# 'items': ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
|
||||
# 'HiddenField']},
|
||||
'/',
|
||||
{'name': 'basicstyles',
|
||||
'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor', '-', 'RemoveFormat', '-']},
|
||||
{'name': 'paragraph',
|
||||
'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-',
|
||||
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl'
|
||||
]},
|
||||
'/',
|
||||
{'name': 'links', 'items': ['Link', 'Unlink', 'Anchor', '-', 'Blockquote' ]},
|
||||
{'name': 'insert',
|
||||
'items': ['Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe']},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user