Custom button with text to disable Quill on a React component
See original GitHub issueHi, I would first like to say that I really like your text editor. It works smoothly even with strings containing html in them, which has been a challenge for me to overcome with other rich text editors.
Currently I am running into two issues. First, I am trying to find an option where I can create a custom button with text ‘Submit’ on the toolbar; and second, that button needs to remove (or disable or unbind) the editor from a React component.
The component:
const EditableClause = ({ id, initalValue, clauseId, handleChange }) => ce(ReactQuill, { value: initalValue, onChange: handleChange, modules: { toolbar: ['bold', 'italic', 'customSubmit'], }, handlers: { 'customSubmit': function() { quill.enable(false); } }, });
When that component is rendered, there is an invisible button beside the Bold and Italic buttons with no value and I get the following warning in console: quill:toolbar ignoring attaching to nonexistent format customSubmit
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Please follow the docs and examples. Try to make it work with Javascript first, without using reactjs. Then, try to add it to reactjs.
github issues are for bugs and development. Please use StackOverflow for questions.
I resolved it through React. Thanks for all the quick replies. I hope you guys add a destroy() method sometime soon!