【问题标题】:CKEditor in Modx ManagerModx 管理器中的 CKEditor
【发布时间】:2014-03-20 18:02:21
【问题描述】:

我尝试使用通过 modx 插件下载的 ckeditor 的 colordialog 插件。为了启用它,我在 /manager/assets/components/ckeditor/ 中编辑了 config.js 文件。

这是内容

CKEDITOR.editorConfig = function( config ) {
    config.plugins = 'colordialog';
};

我也试过这个,但没有运气

CKEDITOR.editorConfig = function( config ) {
    config.extraPlugins = 'colordialog';
};

这是我在 modx 管理器中的配置

“ckeditor.toolbar”设置的值:

[
    { "name": "basicstyles", "groups": [ "basicstyles", "cleanup" ], "items": [ "Bold", "Italic", "Underline", "RemoveFormat" ] },
    { "name": "paragraph", "groups": [ "list", "indent", "blocks", "align" ], "items": [ "NumberedList", "BulletedList"] },
    { "name": "links", "items": [ "Link", "Unlink"] },
    { "name": "clipboard", "groups": [ "clipboard", "undo" ], "items": [ "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Undo", "Redo" ] },
    { "name": "insert", "items": [ "Image", "SpecialChar", "Table" ] },
    { "name": "editing", "items": [ "Find", "Replace" ] },
    { "name": "tools", "items": [ "Maximize" ] },
    { "name": "styles", "items": ["Format"] },
    { "name": "colors", "items": ["colordialog"] }
]

在“ckeditor.extra_plugins”中,我启用了“colordialog”。

【问题讨论】:

    标签: javascript ckeditor modx modx-revolution


    【解决方案1】:

    你在系统设置中看到这个选项了吗?

    【讨论】:

    • 嘿,又是你^^ 是的,我看到了,但这没有用。我将更新我的问题,以便您可以查看我在管理器中的配置。
    • { "name": "colors", "items": [ "TextColor","BGColor" ] } - 适合我
    • 你最好的!谢谢!
    【解决方案2】:

    加载 MODX.loadRTE MODx.loadRTE('eventdetails-' + this.ident); 这里的“eventdetails”是表单字段名称。

    Imaevents.window.CreateImaevent = function(config) {
        config = config || {};
        this.ident = config.ident || Ext.id();
        Ext.applyIf(config,{
            title: _('imaevents.imaevent_create')
            ,url: Imaevents.config.connectorUrl
            ,autoHeight: false
            ,autoScroll: true
            ,height: Ext.getBody().getViewSize().height*.85
            ,width: 665
            ,closeAction: 'hide'
            ,labelAlign: 'left'
            ,labelWidth: 200
            ,baseParams: {
                action: 'mgr/imaevent/create'
            }
            ,fields: [{
                xtype: 'textarea'
                ,id: 'eventdetails-'+this.ident
                ,fieldLabel: _('imaevents.event_datail')
                ,name: 'event_datail'
                ,anchor: '100%'
            }]
        });
        Imaevents.window.CreateImaevent.superclass.constructor.call(this,config);
        this.on('activate',function() {
            if (typeof Tiny != 'undefined') {  MODx.loadRTE('eventdetails-' + this.ident); }
        });
    };                
    Ext.extend(Imaevents.window.CreateImaevent,MODx.Window);
    Ext.reg('imaevents-window-imaevent-create',Imaevents.window.CreateImaevent);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多