Commit 367ed3a4 authored by Ivan Tyagov's avatar Ivan Tyagov

Set Code Mirror as default code editor.

parent ebf155b9
...@@ -9,7 +9,10 @@ portal = context.getPortalObject() ...@@ -9,7 +9,10 @@ portal = context.getPortalObject()
default_site_preference = getattr(portal.portal_preferences, default_site_preference = getattr(portal.portal_preferences,
'default_site_preference', None) 'default_site_preference', None)
if default_site_preference is not None: if default_site_preference is not None:
# enable default gadget UI
default_site_preference.setPreferredHtmlStyleAccessTab(True) default_site_preference.setPreferredHtmlStyleAccessTab(True)
# set code mirror as default source code editor
default_site_preference.setPreferredSourceCodeEditor("codemirror")
if default_site_preference.getPreferenceState() == "disabled": if default_site_preference.getPreferenceState() == "disabled":
default_site_preference.enable() default_site_preference.enable()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment