Giter VIP home page Giter VIP logo

Comments (14)

riklaunim avatar riklaunim commented on September 10, 2024

can you check if that external jquery is before ckeditor init?

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

Yes, it's before. And there isn't 404 errors.

<head>
    <title>...</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/base.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css">
    <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/static/admin/css/ie.css" /><![endif]-->

    <script type="text/javascript">window.__admin_media_prefix__ = "/static/admin/";</script>
    <script type="text/javascript">window.__admin_utc_offset__ = "7200";</script>

    <script type="text/javascript" src="/admin/jsi18n/"></script>
    <script type="text/javascript" src="/static/admin/js/core.js"></script>
    <script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
    <script type="text/javascript" src="/static/admin/js/jquery.js"></script>
    <script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
    <script type="text/javascript" src="/static/admin/js/actions.js"></script>
    <script type="text/javascript" src="/static/ckeditor/ckeditor/ckeditor.js"></script
    <style>.cke{visibility:hidden;}</style>
    <script type="text/javascript" src="/static/ckeditor/ckeditor-init.js"></script>
    <script type="text/javascript" src="/static/admin/js/collapse.js"></script>

    <meta name="robots" content="NONE,NOARCHIVE">
    <link rel="stylesheet" type="text/css" href="chrome-extension://cgndfbhngibokieehnjhbjkkhbfmhojo/css/validation.css">
</head>

js_loading

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

Odd case. Maybe that jQuery version doesn't like "jQuery(function(){" usage in https://github.com/riklaunim/django-ckeditor/blob/master/ckeditor/static/ckeditor/ckeditor-init.js

can you check which version is it?

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

jQuery v1.9.1

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

That shouldn't make any problems. Looks like I'll have to test it with few browsers and configs to see if it can be reproduced and fixed.

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

I test it in OSX 10.9.4 with Chrome v37.0.2062.120, Firefox v29.0.1, Firefox v32.0.1 and Safari v7.0.6.

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

I use Django 1.7 and Python 2.7.

Any solution?

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

I'll try look at the issue today/tomorrow.

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

new version of django-ckeditor released with some JS fixes. Should work now.

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

I have the same javascript error with v4.4.6: "Uncaught TypeError: undefined is not a function"
:(

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

without jQuery it would throw: TypeError: $ is not a function, so in your case it's something after jQuery ready block. Are you sure you are using the latest JS files (collectstatic etc) and if so can you see which line the error is referring to?

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

I serve the js files using Apache:

  Alias /static/ckeditor /lib/python2.7/ckeditor/static/ckeditor/
  <Location /static/ckeditor>
     SetHandler None
  </Location>

And the error is in the first line of ckeditor-init.js:

$(function() {
    initialiseCKEditor();
    initialiseCKEditorInInlinedForms();

    function initialiseCKEditorInInlinedForms() {
        $(".add-row a, .grp-add-handler").click(function () {
            initialiseCKEditor();
            return true;
        });
    }
});

function initialiseCKEditor() {
    $('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'));
        }
    });
}

from django-ckeditor.

riklaunim avatar riklaunim commented on September 10, 2024

does it work with the demo application locally ? It's hard to see a bug in it - either jQuery is missing somehow or something very odd.

from django-ckeditor.

ipmonline avatar ipmonline commented on September 10, 2024

It works now setting with external CKEDITOR_JQUERY_URL!

CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'

Thank you very much for your time!

Regards.

from django-ckeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.