Giter Site home page Giter Site logo

Comments (14)

molsov avatar molsov commented on July 19, 2024 24

This issue is because of the "defer" in

<!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>

removing the "defer" will solve the problem

from laravel-ckeditor.

ctujare avatar ctujare commented on July 19, 2024 2

why is not working for me ?
i have removed "defer"

With "differ" my issue solved. but please let me know what this "differ" is use for?

defer is a boolean attribute that specifies whether the page should finish parsing before the script is executed. It is only for external scripts.

Ok looking at the code it Seems CKEDITOR.replace is running way before the page finishes loading ... so i went old school and added a onload="loadjs()" to the body take and moved CKEDITOR.replace inside that function .... It worked seemlessly without causing #app to cause another error...

Hope this would help someone....

from laravel-ckeditor.

israrzaib199 avatar israrzaib199 commented on July 19, 2024 1

With "differ" my issue solved. but please let me know what this "differ" is use for?

from laravel-ckeditor.

markrobtownsend avatar markrobtownsend commented on July 19, 2024 1

I removed "defer" i have an other issue app.js give this error " app.js:37794 [Vue warn]: Cannot find element: #app
what's meaning of this is it necessary ???

If you want to delete defer, it will execute the script as soon as it comes across it in the code. If you have placed it before the <div id="app"></div> tag closes, it will try and find the element and it won't be there.

To get around this, just move the script to the end of your body element. That's what I did and all has worked fine. On top of this, I can also use the NodeJS compiler without any issues.

from laravel-ckeditor.

codename11 avatar codename11 commented on July 19, 2024 1

I removed "defer" i have an other issue app.js give this error " app.js:37794 [Vue warn]: Cannot find element: #app
what's meaning of this is it necessary ???

If you want to delete defer, it will execute the script as soon as it comes across it in the code. If you have placed it before the <div id="app"></div> tag closes, it will try and find the element and it won't be there.

To get around this, just move the script to the end of your body element. That's what I did and all has worked fine. On top of this, I can also use the NodeJS compiler without any issues.

And i would like to add:

<script src="{{ asset('js/app.js') }}"></script>
    
    <script src="/ckeditor/ckeditor.js"></script>
    <script defer>
        if(document.getElementById("ckeditor")){
            CKEDITOR.replace("ckeditor");
        }
    </script>

just before ckeditor

from laravel-ckeditor.

sajjadalis avatar sajjadalis commented on July 19, 2024

It seems Vue.js is causing issue.
Commenting out Vue stuff in "/resources/js/app.js" fixed this issue.

from laravel-ckeditor.

sajjadalis avatar sajjadalis commented on July 19, 2024

Yes.. "defer" was the reason. Thank you.

from laravel-ckeditor.

serban-alexandru avatar serban-alexandru commented on July 19, 2024

With "differ" my issue solved. but please let me know what this "differ" is use for?

It worked for me! ty @israrzaib199 !

from laravel-ckeditor.

StudioAleph avatar StudioAleph commented on July 19, 2024

I removed "defer" i have an other issue app.js give this error " app.js:37608 [Vue warn]: Cannot find element: #app "
what's meaning of this ?

from laravel-ckeditor.

RifkiCS29 avatar RifkiCS29 commented on July 19, 2024

why is not working for me ?
i have removed "defer"

from laravel-ckeditor.

markrobtownsend avatar markrobtownsend commented on July 19, 2024

why is not working for me ?
i have removed "defer"

With "differ" my issue solved. but please let me know what this "differ" is use for?

defer is a boolean attribute that specifies whether the page should finish parsing before the script is executed. It is only for external scripts.

from laravel-ckeditor.

markrobtownsend avatar markrobtownsend commented on July 19, 2024

why is not working for me ?
i have removed "defer"

Try moving the script to the bottom of the body tag to ensure that the page has loaded before the script is executed.

from laravel-ckeditor.

iamnotstatic avatar iamnotstatic commented on July 19, 2024

I removed "defer" i have an other issue app.js give this error " app.js:37794 [Vue warn]: Cannot find element: #app
what's meaning of this is it necessary ???

from laravel-ckeditor.

Buba-Conteh avatar Buba-Conteh commented on July 19, 2024

This issue is because of the "defer" in

<!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>

removing the "defer" will solve the problem

thanks a lot it worked for me but my vue is not working now

from laravel-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.