<html i18n:domain="plone">

<!-- wysiwyg multiplexing widget, this allows for both TinyMCE, Epoz, Kupu, and Straight HTML to coexist -->
<div metal:define-macro="wysiwygEditorBox">
  <tal:block define="isAnon context/@@plone_portal_state/anonymous;
                     member_editor python: not isAnon and context.portal_membership.getAuthenticatedMember().getProperty('wysiwyg_editor', '').lower() or '';
                     default_editor python: context.portal_properties.site_properties.getProperty('default_editor');
                     default_editor python: (default_editor or 'None').lower();
                     editor python: test(member_editor=='', default_editor, member_editor);
                     support python: editor.lower() == 'none' and path('nocall:here/portal_skins/plone_wysiwyg/wysiwyg_support') or path('nocall:here/%s_wysiwyg_support|here/%s/wysiwyg_support|here/%s_wysiwyg_support|here/%s/wysiwyg_support|here/portal_skins/plone_wysiwyg/wysiwyg_support' % (editor, editor, default_editor, default_editor));">
   <metal:block metal:use-macro="support/macros/wysiwygEditorBox">
   </metal:block>
  </tal:block>
</div>

<div metal:define-macro="textFormatSelector">
  <tal:block define="member_editor python: context.portal_membership.getAuthenticatedMember().getProperty('wysiwyg_editor', '').lower();
                     default_editor python: context.portal_properties.site_properties.getProperty('default_editor');
                     default_editor python: (default_editor or 'None').lower();
                     editor python: test(member_editor=='', default_editor, member_editor);
                     support python: editor.lower() == 'none' and path('nocall:here/portal_skins/plone_wysiwyg/wysiwyg_support') or path('nocall:here/%s_wysiwyg_support|here/%s/wysiwyg_support|here/%s_wysiwyg_support|here/%s/wysiwyg_support|here/portal_skins/plone_wysiwyg/wysiwyg_support' % (editor, editor, default_editor, default_editor));">
   <metal:block metal:use-macro="support/macros/textFormatSelector">
   </metal:block>
  </tal:block>
</div>

</html>
