<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="tinymce">

    <include package="Products.CMFCore"
             file="permissions.zcml"
             zcml:condition="have plone-41" />

    <browser:page
        for="..interfaces.utility.ITinyMCE"
        name="tinymce-controlpanel"
        class=".controlpanel.TinyMCEControlPanelForm"
        permission="plone.app.controlpanel.TinyMCE"
        />

    <browser:page
        for="..interfaces.utility.ITinyMCE"
        name="tinymce-getstyle"
        class=".style.TinyMCEStyle"
        attribute="getStyle"
        permission="zope2.View"
        />

    <browser:page
        for="..interfaces.utility.ITinyMCE"
        name="tinymce-getpathbyuid"
        class=".url.TinyMCEUrl"
        attribute="getPathByUID"
        permission="zope2.View"
        />

    <!-- don't change the name of this. the gzip part is vital for the
        identification of the file -->
    <browser:page
        for="*"
        name="tiny_mce_gzip.js"
        class=".compressor.TinyMCECompressorView"
        permission="zope2.View"
        />

    <browser:page
        for="*"
        name="checkDocument"
        class=".browser.ATDProxyView"
        permission="zope2.View"
        attribute="checkDocument"
        />

    <browser:pages
        for="*"
        class=".browser.TinyMCEBrowserView"
        permission="zope2.View">
        <browser:page attribute="jsonLinkableFolderListing" name="tinymce-jsonlinkablefolderlisting" />
        <browser:page attribute="jsonImageFolderListing" name="tinymce-jsonimagefolderlisting" />
        <browser:page attribute="jsonLinkableSearch" name="tinymce-jsonlinkablesearch" />
        <browser:page attribute="jsonImageSearch" name="tinymce-jsonimagesearch" />
        <browser:page attribute="jsonDetails" name="tinymce-jsondetails" />
        <browser:page attribute="jsonConfiguration" name="tinymce-jsonconfiguration" />
        <browser:page attribute="upload" name="tinymce-upload" />
    </browser:pages>


    <browser:pages
        for="*"
        class=".browser.TinyMCEBrowserView"
        permission="cmf.ModifyPortalContent">
        <browser:page attribute="save" name="tinymce-save" />
        <browser:page attribute="setDescription" name="tinymce-setDescription" />
    </browser:pages>

    <browser:resourceDirectory
        name="tinymce.images"
        directory="images"
        />

    <browser:resourceDirectory
        name="tinymce.stylesheets"
        directory="stylesheets"
        />

    <configure zcml:condition="installed Products.Archetypes">
        <browser:view
    	    name="content_anchors"
            for="Products.Archetypes.interfaces.IBaseObject"
            class=".atanchors.ATAnchorView"
 	    permission="zope2.View"
	    />
    </configure>

    <configure zcml:condition="installed plone.dexterity">
        <browser:view
             name="content_anchors"
             for="plone.dexterity.interfaces.IDexterityContent"
             class=".dxanchors.DexterityAnchorView"
             permission="zope2.View"
        />
    </configure>

    <!-- TinyMCE configuration -->
    <!-- <browser:viewlet
        name="tinymce.configuration"
        manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
        class=".browser.ConfigurationViewlet"
        permission="zope2.View"
        /> -->
        
</configure>
