Re: [ace] getValue() also returns the number lines

64 views
Skip to first unread message
Message has been deleted

Adam Jimenez

unread,
May 15, 2012, 8:59:46 AM5/15/12
to ace-d...@googlegroups.com
This works for me:
editor.getSession().getDocument().getValue();

On 15 May 2012 04:52, Jorge Catumba Ruiz <jorge...@gmail.com> wrote:
Hi, I want to save the changes made in Ace to a file in the server using

editor.getSession().getValue();

but also returns the number lines of the editor. I'd try to use getDocument() but with the same result. Any suggestion?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Ajax.org Cloud9 Editor (Ace)" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ace-discuss/-/z8ynuqAAFY4J.
To post to this group, send email to ace-d...@googlegroups.com.
To unsubscribe from this group, send email to ace-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ace-discuss?hl=en.



--
Best regards,
Adam Jimenez

ShiftEdit IDE | ShiftMail Marketing | CMS systems

ShiftCreate Limited
http://www.shiftcreate.com
t. 020 8123 3766
m. 07969 689 484
skype: adamjjimenez
twitter: adamjimenez1

shiftcreate.com is the trading name of Shiftcreate Limited.
Registered in England Company No. 05862941 registered offices:
64a Southfields, Letchworth, Herts, SG6 4LZ 

Ryuu

unread,
May 25, 2012, 9:18:38 AM5/25/12
to Ajax.org Cloud9 Editor (Ace)
I have been trying to solve that issue myself without any success. By
commenting here I hope to catch someones attention with this issue and
perhaps solve this mystery once and for all.

On 15 Maj, 14:59, Adam Jimenez <a...@shiftcreate.com> wrote:
> This works for me:
> editor.getSession().getDocument().getValue();
>
> On 15 May 2012 04:52, Jorge Catumba Ruiz <jorgere...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Hi, I want to save the changes made in Ace to a file in the server using
>
> > editor.getSession().getValue();
>
> > but also returns the number lines of the editor. I'd try to use
> > getDocument() but with the same result. Any suggestion?
>
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ajax.org Cloud9 Editor (Ace)" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/ace-discuss/-/z8ynuqAAFY4J.
> > To post to this group, send email to ace-d...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > ace-discuss...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/ace-discuss?hl=en.
>
> --
> Best regards,
> Adam Jimenez
>
> ShiftEdit IDE <http://shiftedit.net> | ShiftMail
> Marketing<http://mail.shiftcreate.com/>| CMS
> systems <http://www.shiftcreate.com/cms>
>
> ShiftCreate Limitedhttp://www.shiftcreate.com
> t. 020 8123 3766
> m. 07969 689 484
> skype: adamjjimenez
> twitter: adamjimenez1 <http://twitter.com/AdamJimenez1>

Harutyun Amirjanyan

unread,
May 25, 2012, 1:01:50 PM5/25/12
to ace-d...@googlegroups.com
the most likely cause of this is that you are
calling ace.edit("some_id") for second time
creating new editor in place of the old one
which contains visible part of the text and
number from the gutter

you should cache editor instance you are
getting from ace.edit, or use newer version
of ace which removes this footgun, by returning
old editor when edit is called for second time
Reply all
Reply to author
Forward
0 new messages