--- a/src/pyams_portal/portlets/html/zmi/__init__.py Mon Dec 17 14:40:45 2018 +0100
+++ b/src/pyams_portal/portlets/html/zmi/__init__.py Fri Dec 21 20:11:48 2018 +0100
@@ -12,25 +12,21 @@
__docformat__ = 'restructuredtext'
+from zope.interface import Interface, alsoProvides
-# import standard library
-
-# import interfaces
+from pyams_form.form import AJAXEditForm
from pyams_form.interfaces.form import IInnerTabForm
from pyams_pagelet.interfaces import IPagelet
+from pyams_pagelet.pagelet import pagelet_config
from pyams_portal.interfaces import IPortletPreviewer
-from pyams_portal.portlets.html.interfaces import IRawPortletSettings, IHTMLPortletSettings
+from pyams_portal.portlet import PortletPreviewer
+from pyams_portal.portlets.html.interfaces import IHTMLPortletSettings, IRawPortletSettings
+from pyams_portal.zmi.portlet import PortletSettingsEditor, PortletSettingsPropertiesEditor
from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
-
-# import packages
-from pyams_form.form import AJAXEditForm
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_portal.portlet import PortletPreviewer
-from pyams_portal.zmi.portlet import PortletSettingsEditor, PortletSettingsPropertiesEditor
from pyams_template.template import template_config
from pyams_utils.adapter import adapter_config
-from zope.interface import Interface
+from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
+from pyams_utils.interfaces.data import IObjectData
#
@@ -52,7 +48,12 @@
def updateWidgets(self, prefix=None):
super(RawPortletSettingsPropertiesEditor, self).updateWidgets(prefix)
if 'body' in self.widgets:
- self.widgets['body'].widget_css_class = 'monospace input height-200'
+ widget = self.widgets['body']
+ widget.widget_css_class = 'monospace input height-400 text-editor'
+ widget.object_data = {
+ 'ams-editor-mode': 'ace/mode/html'
+ }
+ alsoProvides(widget, IObjectData)
@adapter_config(name='properties.json', context=(IRawPortletSettings, IPyAMSLayer), provides=IPagelet)