-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two way data binding is not working #2
Comments
using observer doesn't solve the problem. It creates new problem of duplicate content being set to the quill editor and also resets the cursor position. probably providing method to change entire content of the quill might work? |
I still trying to figure this one out. Once I do I will update. |
Just release a new version of I also was able to use the |
Hi Chuck, Thanks for the update. two way data binding is still not working. from polymer-quill to host, data binding is working but not the other way. so i don't see any use for it seems you've set an observer for the content but it's not implemented. I've tried observer approach, but it creates additional problems. so if we want to reset the quill editor content,i think it's better to expose a function to do that. like in polymer-quill
usage in host
|
unfortunately the problem didn't solved. I think @hariprasadiit suggested good solution of this problem. I used invokation on this function in _contentChanged handler in async mode and this worked for me. Can you update this in new version? thank you |
@hariprasadiit @misterzorgy I made the suggested change on this commit c8067ab with some additional logic. Let me know if this fixes this issue. |
I just released polymer-quill version 0.8.0 https://github.com/chuckh/polymer-quill/releases/tag/v0.8.0. This includes the following:
|
In my situation, when useContentReset is true then my editor goes haywire and resets focus to the beginning of document as I am typing. But I still need this to bring in external docs from db. So what I do is useContentReset to true, set content, then useContentReset to false. Decent workaround. |
@petecarapetyan yes, I have same issue. your solution works to me. thank you.
|
@AutumnSky I'm new to Polymer. Can you please tell me where have you placed the following code : this.$.quillEditor.useContentReset = true;
this.commentContent = "";
this.$.quillEditor.setContent();
this.$.quillEditor.useContentReset = false; |
@atifwaqar apply that logic to where you want to reset quillEditor's content. another code here. var quillEditor = this.$$('#quillEditor'); ps. Sorry for poor English... |
I see the same issue as @petecarapetyan, wherein |
I think two way data binding for the content is not working.
steps to reproduce.
probable cause :
polymer-quill
respects the data binding system. but after setting the initial content to the quill, data flow is only one way, i.e from quill tocontent
property.probably it can be solved by using an observer to observe the
content
property, then change the quill content whenever it changes.I'll try to use observer to see if this solves the problem.
The text was updated successfully, but these errors were encountered: