mizzao / meteor-sharejs

Meteor smart package for transparently adding ShareJS editors to an app
MIT License
225 stars 53 forks source link

Let plain shareJSText class use onRender and onConnect parameters #34

Closed Xananax closed 9 years ago

Xananax commented 9 years ago

In my app, I need to listen to onConnect in order to focus the cursor in the text box when the document has loaded. As I am building a keyboard focused-app, it is a bother if the user has to click in the textarea after the "loading..." message disappears. I suppose having the callbacks make sense for a lot of use cases, not only mine, which is why I submit this pull request.
I've never looked at coffeescript and I'm mainly a beginner, so if I've messed up something, please tell me.

mizzao commented 9 years ago

Looks good, thanks.