Skip to content

Commit 3fa48dc

Browse files
authored
Merge pull request #24 from moscowpython/issue_wysiwyg_settings
wysiwyg settings
2 parents 187b3b5 + 7425f98 commit 3fa48dc

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

python_ru/settings/base.py

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136

137137
STATICFILES_DIRS = (
138138
os.path.join(BASE_DIR, '../assets'),
139-
)
139+
)
140140
STATIC_URL = '/static/'
141141

142142
# Simplified static file serving.
@@ -150,11 +150,38 @@
150150

151151
CKEDITOR_CONFIGS = {
152152
'default': {
153-
'toolbar': [['Source', 'Link', 'Unlink', 'SpecialChar', 'Image', 'CodeSnippet']],
154-
'height': 400,
155-
'width': 900,
153+
'toolbar_Basic': [['Source', 'Link', 'Unlink', 'SpecialChar', 'Image', 'CodeSnippet']],
154+
'toolbar_CustomConfig': [
155+
{'name': 'basicstyles',
156+
'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']},
157+
{'name': 'paragraph',
158+
'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-',
159+
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl',
160+
'Language']},
161+
{'name': 'links', 'items': ['Link', 'Unlink', 'Anchor']},
162+
{'name': 'insert',
163+
'items': ['Image', 'CodeSnippet', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak']},
164+
'/',
165+
{'name': 'styles', 'items': [
166+
'Styles', 'Format', 'Font', 'FontSize']},
167+
{'name': 'colors', 'items': ['TextColor', 'BGColor']},
168+
],
169+
'toolbar': 'toolbar_CustomConfig', # put tollbar config name here
156170
'removePlugins': 'stylesheetparser',
157-
'extraPlugins': 'codesnippet',
171+
'extraPlugins': ','.join([
172+
'codesnippet',
173+
'div',
174+
'autolink',
175+
'autoembed',
176+
'embedsemantic',
177+
'autogrow',
178+
'widget',
179+
'lineutils',
180+
'clipboard',
181+
'dialog',
182+
'dialogui',
183+
'elementspath'
184+
]),
158185
},
159186
}
160187

0 commit comments

Comments
 (0)