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

model of ng-quill-editor doesn't updated dynamically without typing in editor. #25

Closed
mir-nawaz-10p opened this issue Nov 19, 2015 · 4 comments

Comments

@mir-nawaz-10p
Copy link

issue

When model of ng-quill-editor doesn't updated dynamically without typing in editor.

update model at run time without typing it doesn't update model.

Here is a link to a similar type issue.
http://stackoverflow.com/questions/29731771/ng-quill-text-editor-only-updates-once

please enable two way data binding

In the latest version of ng-quill
The $window scroll is moving when we have fixed height for ".editor-container".

@mir-nawaz-10p mir-nawaz-10p changed the title When model of ng-quill-editor doesn't updated dynamically without typing in editor. model of ng-quill-editor doesn't updated dynamically without typing in editor. Nov 19, 2015
@KillerCodeMonkey
Copy link
Owner

I do not want two-way data-binding for that to not destroy the original quill-editor behavior.
To solve your Problem:

  1. After the editor is created you get the editor instance via an angularjs event "editorCreated".
    $scope.$on("editorCreated", function (event, quillEditor) { // store editor instance });
  2. If you change the model programmatically --> you can trigger to refresh the editor by using the quill-functions http://quilljs.com/docs/api/#quillprototypesethtml
    quillEditor.setHTML(newValue);

Please try this approach and let me know if this works for you.

Thanks and greets.

@mir-nawaz-10p
Copy link
Author

Thanx. It worked for me .
But the scroll issue still persists.
I want a fixed height ".editor-container" div.
but it affects the scroll behavior of the of parent div and ".editor-container" div.
also when clicking on toolbar the ".editor-container" div's scroll moves to top on IE and FF.
Thanx for the help
Regards
Mir

@KillerCodeMonkey
Copy link
Owner

the scroll behavior sounds like a quill editor problem.
I do not add additional css stylings. I only upgraded quilljs and angularjs in the latest version.

There is a workaround for that:
slab/quill#288

@mir-nawaz-10p
Copy link
Author

Thanks
The above linked worked for the scroll behavior

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants