Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

I can't add Undo/Redo Buttons to quill-editor #69

Open
didacpr opened this issue Jun 18, 2019 · 1 comment
Open

I can't add Undo/Redo Buttons to quill-editor #69

didacpr opened this issue Jun 18, 2019 · 1 comment

Comments

@didacpr
Copy link

didacpr commented Jun 18, 2019

Hi! I've installed the ngx-quill-editor and it works perfectly, but I need to add the Undo/Redo buttons and I can't make it works.

Here you have a github repository that I've created and reproduced the Issue.
https://github.com/didacpr/quill-editor

I'm using:

  • Angular 7.2.0
  • "ngx-quill-editor": "^2.2.2",

What am I doing wrong?

Thanks!

@amr-ayman
Copy link

Hello @didacpr
I had the same problem
After much reading, I came up with this solution:-
quill; options = { toolbar: { container: [ ['bold', 'italic', 'link', {list: 'bullet'}, {list: 'ordered'}, 'blockquote', {redo: 'redo'}, {undo: 'undo'} ] ], handlers: { redo() { this.quill.history.redo(); }, undo() { this.quill.history.undo(); } } }, history: { delay: 2000, maxStack: 500, userOnly: true } };

And for the HTML:-
<quill-editor (onEditorCreated)="quill = $event" [modules]="options"></quill-editor>

And it works fine.
Happy coding ;)

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