@register.simple_tag<EOL>def wysiwyg_editor(field_id, editor_name=None, config=None, editor_override=None):
if not editor_name:<EOL><INDENT>editor_name = "<STR_LIT>" % field_id<EOL><DEDENT>ctx = {<EOL>'<STR_LIT>':     field_id,<EOL>'<STR_LIT>':  editor_name,<EOL>'<STR_LIT>': config<EOL>}<EOL>ctx.update(get_settings(editor_override=editor_override))<EOL>if editor_override is not None:<EOL><INDENT>ctx['<STR_LIT>'] = editor_override<EOL><DEDENT>return render_to_string(<EOL>"<STR_LIT>" % ctx['<STR_LIT>'],<EOL>ctx<EOL>)<EOL>
Turn the textarea #field_id into a rich editor. If you do not specify the
JavaScript name of the editor, it will be derived from the field_id.

If you don't specify the editor_name then you'll have a JavaScript object
named "<field_id>_editor" in the global namespace. We give you control of
this in case you have a complex JS ctxironment.