Add support for raw HTML editor.
STUD-1562
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user