Merge remote-tracking branch 'origin/main'
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']:
|
if db_field.name in ['question', 'FAQ_title']:
|
||||||
formfield.widget = admin.widgets.AdminTextInputWidget(attrs={'style': 'width: 80%'})
|
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 formfield and formfield.widget:
|
||||||
# if type(formfield.widget) in (admin.widgets.AdminSplitDateTime, ):
|
# if type(formfield.widget) in (admin.widgets.AdminSplitDateTime, ):
|
||||||
# formfield.widget.attrs.update({'style': 'width: 400px'})
|
# 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 = {
|
CKEDITOR_CONFIGS = {
|
||||||
'default': {
|
'default': {
|
||||||
|
'height': 291,
|
||||||
|
'width': '89vw',
|
||||||
|
# 'filebrowserWindowHeight': 600,
|
||||||
|
# 'filebrowserWindowWidth': "100%",
|
||||||
'toolbar': 'Custom',
|
'toolbar': 'Custom',
|
||||||
|
'forcePasteAsPlainText': True,
|
||||||
|
# 'toolbar_Custom': [
|
||||||
|
# ['Bold', 'Italic', 'Underline'],
|
||||||
|
# ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
||||||
|
# ['Link', 'Unlink'],
|
||||||
|
# ['RemoveFormat', 'Source']
|
||||||
|
# ],
|
||||||
'toolbar_Custom': [
|
'toolbar_Custom': [
|
||||||
['Bold', 'Italic', 'Underline'],
|
{'name': 'document', 'items': ['Source', '-', 'Save', '-', 'Find', 'Replace', '-', 'SelectAll']},
|
||||||
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
|
{'name': 'clipboard', 'items': ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', '-', 'Maximize', 'ShowBlocks']},
|
||||||
['Link', 'Unlink'],
|
# {'name': 'forms',
|
||||||
['RemoveFormat', 'Source']
|
# '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