Closed liuweiming1997 closed 3 years ago
Nothing jumps out at me. The issue is CodeMirror is not defined for some reason, but I can see that it is being included. Check your HTTP network tab, make sure it's being loaded.
Nothing jumps out at me. The issue is CodeMirror is not defined for some reason, but I can see that it is being included. Check your HTTP network tab, make sure it's being loaded.
Thanks your reply, my network is not blocked and I try to use CodeMirror
directly, it`s works..
The issue is that mergely is being required before CodeMirror. Change the order:
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.1/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.1/addon/search/searchcursor.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mergely/4.3.1/mergely.min.js"></script>
The mergely plugin is being initialized even before you call $('#mergely').mergely
and it has a dependency on CodeMirror.
Thanks @wickedest answer, it`s helpful, it works for me. But your explain is a little confused to me, because I don`t use mergely(but I include it and the order is wrong), there is no error happened. confusing
I was trying to explain that when the mergely script is imported, it has an immediate dependency on CodeMirror and jQuery, which must be included prior, or else you will get errors.
HI all, as a newbie of FE, I can`t solve the problem I use most of the mergely code demo and doesn`t work. (it means I don`t integrate with mergely.js at all) the Error is
I guess is sth error with JQuery version and Mergely version? But I try to use the demo code version, but still doesn`t work. can anyone help me? Thanks. My Code is