Вопрос

I try to use the colordialog plugin of the ckeditor which is downloaded with the modx addon. To Enable it I edited the config.js file in /manager/assets/components/ckeditor/.

Here is the content

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

I also tried this, but with no luck

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

Here is my config in the modx manager

Value of "ckeditor.toolbar" Setting:

[
    { "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"] }
]

And in the "ckeditor.extra_plugins" I have enabled the "colordialog".

Это было полезно?

Решение

Did you see this option in system settings?

ckeditor option in system settings

Другие советы

load the MODX.loadRTE MODx.loadRTE('eventdetails-' + this.ident); here "eventdetails" is the form field name.

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);

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top