opencoweb with ace editor,

31 views
Skip to first unread message

jiun bookworm

unread,
Jul 14, 2013, 2:03:22 PM7/14/13
to open...@googlegroups.com
Hi,
im trying to get ace editor working with opencoweb,  it seems ace treats  edits as a 2-D  event with a row and column, but opencoweb works with a linear array (i think so) i was able to get some basic functionality working (namely typing in one window  shows up in another in the same session)  but nothing beyond that,  deletions (anything more than one character at a time) and replace does not work, the results end up borked on the other side, is there  something i need to consider to get it working right?

Florian Sellmayr

unread,
Jul 14, 2013, 8:40:00 PM7/14/13
to open...@googlegroups.com
Hi, 

In my project we are using CodeMirror which provides an indexFromPos method to convert (row,column) positions (for Ace, positionToIndex (http://ajaxorg.github.io/ace/#nav=api&api=document) seems to do the same). 
You might want to take a look at windows- vs linux-style line endings, they caused problems in our implementation (though in our case, the server played a role as well) 

Cheers, 
Florian

jiun bookworm

unread,
Jul 17, 2013, 6:50:36 AM7/17/13
to open...@googlegroups.com
Florian,
Thanks, i was finally able to get it to work decently, turns out i had introduced a regression while  creating the ace editor and its cooperative functionality.
But i just got it right so i don know how it will end up in production.
cheers.
Jiun
Reply all
Reply to author
Forward
0 new messages