【问题标题】:Plone ckeditor disable browse server克隆ckeditor禁用浏览服务器
【发布时间】:2012-01-09 20:31:28
【问题描述】:

我正在使用 Plone 4.1 和 ckeditor 3.6.2。 我禁用了图片和 Flash 上传(通过 @@ckeditor-controlpanel)

不幸的是,当我添加超链接时,有一个“浏览服务器”按钮。

我添加了空属性(在门户属性下)

filebrowserImageBrowseLinkUrl
filebrowserImageBrowseUrl
filebrowserBrowseUrl 

什么都没发生。

如何禁用此按钮?

问候, 沙龙巴

【问题讨论】:

    标签: javascript ckeditor plone


    【解决方案1】:

    经过很长时间,我有了解决方案。 我重写了 CKeditorView 类。我在“我的”configure.zcml 中添加了:

    <!-- ckeditor config view (return a javascript file) -->
    <browser:page
        name="ckeditor_plone_config.js"
        for="zope.interface.Interface"
        class=".ckeditorview.CKeditorView"
        attribute="getCK_plone_config"
        permission="zope.Public"
        />
    

    添加一个包含此内容的新文件 ckeditorview.py:

    from collective.ckeditor.browser.ckeditorview import CKeditorView as BaseView
    
    class CKeditorView(BaseView):
        """
        CKeditor overrides
        """
    
        def getCK_plone_config(self):
            res = super(CKeditorView, self).getCK_plone_config()
            return res
    
        @property
        def cke_params(self):
            """
            return CKEditor widget Settings
            """
            params = super(CKeditorView, self).cke_params
            params['filebrowserBrowseUrl'] = "''"
            params['filebrowserImageBrowseUrl'] = "''"
            params['filebrowserFlashBrowseUrl'] = "''"
    
            return params
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-11
      • 2016-10-25
      • 1970-01-01
      • 2015-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多