【问题标题】:How calling jquery method in CKEDITOR.dialog如何在 CKEDITOR.dialog 中调用 jquery 方法
【发布时间】:2015-04-11 04:44:28
【问题描述】:

他在 CKEDITOR 对话框插件中有一种方法可以调用 jquery 函数。 基本上,我想将 Text 元素转换为 Jquery 颜色选择器

CKEDITOR.dialog.add( 'testtyni', function( editor ) {
     return {
        title: 'Edit Simple Box',
        minWidth: 200,
        minHeight: 100,
        contents: [
            {
                id: 'info',
                elements: [
                        {
                            type: 'text',
                            id: 'color',
                            label: 'Background Color',
                            'default': '',
                            setup:function(widget){
                                //$ Is Undefined
                                $(this).colorPicker();
                            }
                        }
                    ]
            }
        ]
    };
} );

问题是 $ 没有定义。

我想我调用 colorPicker 方法也会遇到问题。

请帮忙。

【问题讨论】:

    标签: jquery color-picker


    【解决方案1】:

    您确定要先加载 jQuery 吗?有关更多信息,请参阅此问题
    jQuery TypeError: $ is undefined

    【讨论】:

      猜你喜欢
      • 2011-08-21
      • 1970-01-01
      • 2017-08-09
      • 1970-01-01
      • 2019-05-23
      • 2020-09-01
      • 2023-03-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多