CKeditor Colorbox Integration

↘锁芯ラ 提交于 2020-01-04 18:18:21

问题


I want to use colorbox inline image, which can be done using http://website-design.operationenterprise.com/articles/website-development/colorbox-ckeditor-drupal-7, but I want to automate the the process for it to be user friendly.

The code I used

    CKEDITOR.on( 'dialogDefinition', function( ev )
{

var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;


if ( dialogName == 'image' )
{
var linkTab = dialogDefinition.getContents( 'info' );
var link = linkTab.get( 'txtUrl' );

link['onChange'] = function(evt){
var dialog = CKEDITOR.dialog.getCurrent();
dialog.getContentElement('Link', 'txtUrl').setValue(dialog.getContentElement('info', 'txtUrl').getValue());
  }

if ( dialogName == 'link' )
    {

        var infoTab = dialogDefinition.getContents( 'advanced' );


        var cssField = infoTab.get( 'advCSSClasses' );
        cssField['default'] = 'colorbox-load';
    }
}
});

Copying url in image-link tab tab worked fine but setting default css in Link dialog didnot.

I am no Java developer, so What am i doing wrong

PLease HELP

来源:https://stackoverflow.com/questions/14827629/ckeditor-colorbox-integration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!