question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom button with text to disable Quill on a React component

See original GitHub issue

Hi, 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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benbrocommented, Oct 5, 2017

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.

0reactions
harmeetjaipurcommented, Oct 5, 2017

I resolved it through React. Thanks for all the quick replies. I hope you guys add a destroy() method sometime soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I disable the Quill editor
I have a a template which displays rich text data. When the user clicks edit I turn the template into an editable Quill...
Read more >
How to Customize Quill
This would be a good first place to look to determine if you even need to implement any custom functionality. Two of the...
Read more >
react-quill
The Quill rich-text editor as a React component.. Latest version: 2.0.0, ... Controlled mode caveats; Using Deltas; Themes; Custom Toolbar.
Read more >
Input Components - React-admin
Tip: If you need to do this globally, including for custom input components that do not use the useInput hook, have a look...
Read more >
React Quill Editor with full toolbar options and custom ...
I would recommend that you split the code into 2 files: EditorToolbar.js — keep the toolbar component and associated stuff, and Editor.js —...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found