Plon ckeditor 禁用浏览服务器

发布于 2024-12-22 17:50:46 字数 300 浏览 1 评论 0原文

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

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

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

filebrowserImageBrowseLinkUrl
filebrowserImageBrowseUrl
filebrowserBrowseUrl 

什么也没发生。

我怎样才能禁用这个按钮?

问候, 萨龙巴

I am using Plone 4.1 an ckeditor 3.6.2.
I disabled image and flash upload (via @@ckeditor-controlpanel)

Unfortuantely there is a "Browse Server" Button when I add a hyperlink.

I added empty properties (under portal-properties)

filebrowserImageBrowseLinkUrl
filebrowserImageBrowseUrl
filebrowserBrowseUrl 

nothing happend.

How can i disable this button?

regards,
saromba

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

累赘 2024-12-29 17:50:46

经过很长时间我有了解决方案。
我重写了 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

After long time I have the solution.
I override the CKeditorView class. I added in "my" 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"
    />

add a new file ckeditorview.py with this content:

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文