--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/zmi/tinymce.py Thu Oct 08 13:37:29 2015 +0200
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_form.interfaces.form import IForm
+from pyams_skin.interfaces.tinymce import ITinyMCEConfiguration
+from pyams_skin.layer import IPyAMSLayer
+
+# import packages
+from pyams_utils.adapter import adapter_config, ContextRequestAdapter
+
+
+@adapter_config(context=(IForm, IPyAMSLayer), provides=ITinyMCEConfiguration)
+class TinyMCEEditorConfiguration(ContextRequestAdapter):
+ """TinyMCE editor configuration"""
+
+ @property
+ def configuration(self):
+ return {'ams-plugins': 'pyams_content',
+ 'ams-plugin-pyams_content-src': '/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js',
+ 'ams-plugin-pyams_content-async': 'false',
+ 'ams-tinymce-init-callback': 'PyAMS_content.TinyMCE.initEditor'}