Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fun-apps / static / ckeditor / ckeditor-init.js
Size: Mime:
// FUN ckeditor expect to fin jQuery reference on `$` but it's actually on `django.jQuery`
django.jQuery(function($){

    function initCKEditor(){
        $('textarea[data-type=ckeditortype]').each(function(){
            if($(this).data('processed') == "0" && $(this).attr('id').indexOf('__prefix__') == -1){
                $(this).data('processed',"1");
                CKEDITOR.replace($(this).attr('id'), $(this).data('config'));
            }
        });
    }

    initCKEditor();

    $(".add-row a").click(function(){
        initCKEditor();
        return true;
    });

});