Add support for raw HTML editor.

STUD-1562
This commit is contained in:
cahrens
2014-04-22 15:07:32 -04:00
committed by David Baumgold
parent 01fdc22323
commit ad3d8c7871
12 changed files with 156 additions and 85 deletions

View File

@@ -36,6 +36,16 @@ class HtmlFields(object):
default=False,
scope=Scope.settings
)
editor = String(
help="Supports switching between the Visual Editor and the Raw HTML Editor. The change does not take effect until Save is pressed.",
display_name="Editor",
default="visual",
values=[
{"display_name": "Visual", "value": "visual"},
{"display_name": "Raw", "value": "raw"}
],
scope=Scope.settings
)
class HtmlModule(HtmlFields, XModule):
@@ -113,6 +123,7 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor):
_context.update({
'base_asset_url': StaticContent.get_base_url_path_for_course_assets(self.location) + '/',
'enable_latex_compiler': self.use_latex_compiler,
'editor': self.editor
})
return _context