Is there a way to unfocus?
I want to update the whole text format using my code and i don't want to give my user the option to write text after it. I update the format of the whole text (range: start=0, end=text length) using formatText method and then the text area on focus and the user can write:/
quill. disable() should do the trick.
in React Quill 1.3. 5, you can add the readOnly prop as true. It will disable your editor like input tag when disabled.
There is not an explicit unfocus()
API since there's not much that Quill needs beyond the existing DOM blur function:
quill.root.blur()
The user can of course click back into the editor so if you want to prevent that you can disable the whole editor with:
quill.editor.disable()
You may still make API calls but the user will be unable to interact with the editor while disabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With