ShareDB with Textarea?

85 views
Skip to first unread message

Richard Caceres

unread,
May 17, 2016, 2:55:25 AM5/17/16
to ShareJS
Hello, I have been a longtime ShareJS 6 user and am looking to upgrade to ShareDB to make use of new features and cleaner apis.

However, I cannot find any examples of ShareDB with a textarea. I am pretty certain it must be possible because it supports the ot-types.

Does anyone have an example of using ShareDB with the "text" type used on a textarea?

If not, what is the best way to do this? Should I port over this old textarea code (https://github.com/share/ShareJS/blob/master/lib/client/textarea.js) to work with ShareDB? 

Thank you.

Richard Caceres

unread,
May 25, 2016, 3:31:55 AM5/25/16
to ShareJS
Hello again. I now have something that seems to be working. So that no one else has to go through this trouble, I created an example and posted it to github. Code review or testing is appreciated, because I don't know if there's anything I missed. 

Nate Smith

unread,
May 25, 2016, 6:09:07 PM5/25/16
to sha...@googlegroups.com
Awesome! Thanks for sharing. Avital will be working on some examples once we clean up a few loose ends as part of 1.0. This is a great example. I'll leave some comments on github.

On Wed, May 25, 2016 at 12:31 AM, Richard Caceres <rchr...@gmail.com> wrote:
Hello again. I now have something that seems to be working. So that no one else has to go through this trouble, I created an example and posted it to github. Code review or testing is appreciated, because I don't know if there's anything I missed. 

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

Reply all
Reply to author
Forward
0 new messages