Open leblancmeneses opened 10 years ago
Hey,
I see you have also raised the same issue at the ckeditor repository - https://github.com/ckeditor/ckeditor-releases/issues/11#issuecomment-46106350 which is cool.
I just take the output of that project and wrap it in a nuget library so one they have sorted it out I'll rewrap the package.
I'll keep this issue going until the other one is resolved
Thanks
Mark
Is there any way in which we can help in debugging this issue? I've seen the ticket with source maps, but we still haven't decided what to do there.
I'd debug it by myself, but I haven't used mvc bundler before.
Here's an unminified package of CKEditor, I hope it will make the debugging process easier: http://ckeditor.com/tmp/ckeditor_4.4.2_standard_unminified.tar.gz
You can build it by yourself in the future with:
$ git clone https://github.com/ckeditor/ckeditor-presets.git
$ cd ckeditor-presets
$ git submodule init
$ git submodule update
$ ./build.sh standard --leave-js-unminified
// OR include all plugins
$ ./build.sh standard all --leave-js-unminified
The release will be created in the "build" folder. Once you find the invalid line, just report it @ http://dev.ckeditor.com
Our working workaround: We ended up writing an IBundleTransform, ItemTransform that would skip .min files. It just concats the min directly to the output stream. This will work moving forward.
Alright, so if anyone else encounters
run-time error JS1019: Can't have 'break' outside of loop: break a
and is willing to help in resolving this issue, then please use the unminified version of CKEditor and report what code exactly is causing it. Check the error console and paste a couple of relevant lines from ckeditor.js so that we could locate it (a line number may not help).
CKEDITOR.dom.selection.prototype = { (...) selectRanges: function(a) { (...) } else { var g; a: { var i, j; if (a.length == 1 && !(j = a[0]).collapsed && (g = j.getEnclosedNode()) && g.type == CKEDITOR.NODE_ELEMENT) { j = j.clone(); j.shrink(CKEDITOR.SHRINK_ELEMENT, true); if ((i = j.getEnclosedNode()) && i.type == CKEDITOR.NODE_ELEMENT) g = i; if (g.getAttribute("contenteditable") == "false") ****** NO LOOP HERE ****** break a } g = void 0 }
And no loop here:
CKEDITOR.dom.selection.prototype = { (...) selectRanges: function(a) { (...) } else { var g; a: { var i, j; if (a.length == 1 && !(j = a[0]).collapsed && (g = j.getEnclosedNode()) && g.type == CKEDITOR.NODE_ELEMENT) { j = j.clone(); j.shrink(CKEDITOR.SHRINK_ELEMENT, true); if ((i = j.getEnclosedNode()) && i.type == CKEDITOR.NODE_ELEMENT) g = i; if (g.getAttribute("contenteditable") == "false") /* * * * * * * NO LOOP HERE * * * * * \ **/ break a } g = void 0 }
@wwalc @vokiel
Looks like you have got some feedback!
Did anyone happen to find a solution to this issue? I have tried replacing the breaks with a return false but this breaks the code.
P.S. I am trying to use CKEditor 4 with an ASP.NET Core project.
@wwalc @vokiel
this nuget package currently causes problem with the mvc bundler
https://github.com/ckeditor/ckeditor-releases/issues/11
"run-time error JS1019: Can't have 'break' outside of loop: break a"
i consolidate all my scripts into 1... cannot do this right now due to ckeditor.js