mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-17 03:31:11 +00:00
Allow passing of options into Rich Text Editor.
This commit is contained in:
parent
e1c3a751ca
commit
5732e215b0
2 changed files with 7 additions and 1 deletions
|
|
@ -165,6 +165,7 @@ Contributors
|
|||
* Luiz Boaretto
|
||||
* Jonathon Moore
|
||||
* Kees Hink
|
||||
* Jayden Smith
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -54,4 +54,9 @@ def get_rich_text_editor_widget(name='default'):
|
|||
editor_settings = getattr(settings, 'WAGTAILADMIN_RICH_TEXT_EDITORS', DEFAULT_RICH_TEXT_EDITORS)
|
||||
|
||||
editor = editor_settings[name]
|
||||
return import_string(editor['WIDGET'])()
|
||||
options = editor.get('OPTIONS', None)
|
||||
|
||||
if options is None:
|
||||
return import_string(editor['WIDGET'])()
|
||||
|
||||
return import_string(editor['WIDGET'])(options=options)
|
||||
|
|
|
|||
Loading…
Reference in a new issue