Reputation: 185
Is there any way to add view source code button to quilljs editor?
I looked into the documentation and no explanation for this or should be developed by the developer.
Any help will be appreciated. Thanks
Upvotes: 4
Views: 2625
Reputation: 7339
I haven't extensively looked at the api but I think you are best off rolling your own button. It seems quill.js allows you to add your own custom toolbars to the documentation. I would look at this page to do that. http://quilljs.com/docs/modules/toolbar/
You can add an on click on the button that simply gets the editor's html and puts it in an element using this. var html = editor.getHTML();
http://quilljs.com/docs/api/#quillprototypegethtml
Sorry to be brief, but if you need more info on how you can comment below.
Upvotes: 1