CodeMirror error: There is no line -1 in the document

83 views
Skip to first unread message

lbon...@gmail.com

unread,
Sep 15, 2016, 6:53:44 AM9/15/16
to Mergely
Hello !

I'm new to mergely and tried to use it in an application. I encounter an error and I can't find a clue to solve it.

The error occurs when I have something like this:

On the left side I have:
<p>This is my paragraph</p>

On the right side I have:
<h1>Title</h1>
<p>This is my paragraph</p>

It seems like adding content on the top of the beginning of the left editor is giving this error. Otherwise it works well. I tested with Internet Explorer and Google Chrome last versions.

I am using the last version (3.4.3) of mergely with the built in codemirror file and jquery 1.9.

Here is how I use mergely:

$("#compareDiv").mergely({
cmsettings: {mode: "application/xml", readOnly: true, lineWrapping: false, lineNumbers: false },
});
$('#compareDiv').mergely('lhs', leftContent);
$('#compareDiv').mergely('rhs', rightContent);

Please can you help me ?

Lucie

Jamie Peabody

unread,
Sep 15, 2016, 7:18:10 AM9/15/16
to lbon...@gmail.com, Mergely
What is the error?  Is there an error in the developer console?


--
You received this message because you are subscribed to the Google Groups "Mergely" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mergely+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lbon...@gmail.com

unread,
Sep 15, 2016, 7:30:02 AM9/15/16
to Mergely, lbon...@gmail.com
Sorry ! It was in the title so I forgot to rewrite it ^^"
It's a JavaScript error that appears in the console:
Uncaught Error: There is no line -1 in the document. codemirror.js:7763

Jamie Peabody

unread,
Sep 15, 2016, 8:01:52 AM9/15/16
to lbon...@gmail.com, Mergely
It looks like a bug in Mergely.  I will try to look into it later.  Either that, you can put a breakpoint on the CodeMirror error and debug it yourself.

Jamie


guangmi...@gmail.com

unread,
Oct 1, 2018, 7:14:44 AM10/1/18
to Mergely
I know this was asked a while ago, was this issue fixed? I had the same issue in my application. Thank you!

On Thursday, September 15, 2016 at 7:01:52 AM UTC-5, Jamie Peabody wrote:
> It looks like a bug in Mergely.  I will try to look into it later.  Either that, you can put a breakpoint on the CodeMirror error and debug it yourself.
>
>
> Jamie
>
>
>
>
>
> On 15 September 2016 at 12:30, <lbon...@gmail.com> wrote:
> Sorry ! It was in the title so I forgot to rewrite it ^^"
>
> It's a JavaScript error that appears in the console:
>
> Uncaught Error: There is no line -1 in the document.    codemirror.js:7763
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Mergely" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to mergely+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages