Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Retrieve editor contents/Expose quill instance #9

Closed
mattcreaser opened this issue May 13, 2014 · 1 comment · Fixed by #20
Closed

Retrieve editor contents/Expose quill instance #9

mattcreaser opened this issue May 13, 2014 · 1 comment · Fixed by #20

Comments

@mattcreaser
Copy link

Doesn't look like there's a publicly exposed method for retrieve the editor contents programatically.

Since the widget is built on top of Quill, which does expose this functionality, perhaps the internal Quill instance should just be exposed publicly and documented?

Alternatively there could be interfaces that call through to the Quill instance if you don't want to expose that for encapsulation reasons.

@byronm
Copy link
Contributor

byronm commented May 14, 2014

Good point.

I think that since the idea behind the widget is simplicity and drop-in functionality, we should maintain encapsulation around Quill.

For the purpose of retrieving editor contents, it may make more sense to expose a reference (or wrapper interface) to the GoInstant OT api, rather than to Quill, since OT is the data layer.

One option would be to add a documentName option to the widget constructor, so that you can specify the OT key that gets created/loaded (if it doesn't already exist). This make the widget capable of supporting multiple documents within the same room, which seems like a good thing.

Then the only decision would be if we want to rely on the client instantiating their own OT key (using documentName), return a reference to the OT key via a call into the widget, or just return the contents via a call into the widget.

What do you think?

byronm added a commit that referenced this issue May 14, 2014
byronm added a commit that referenced this issue May 15, 2014
byronm added a commit that referenced this issue May 21, 2014
byronm added a commit that referenced this issue May 21, 2014
This fixes #9.

Signed-off-by: byronm <byronm@cs.stanford.edu>
byronm added a commit that referenced this issue May 21, 2014
This fixes #9.

Signed-off-by: Jason Chen <jhchen7@gmail.com>
byronm added a commit that referenced this issue May 21, 2014
This fixes #9.

Signed-off-by: byronm <byronm@cs.stanford.edu>
Signed-off-by: Jason Chen <jhchen7@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants