Code Monkey home page Code Monkey logo

Comments (8)

zenoamaro avatar zenoamaro commented on July 22, 2024 35

You can now pass false to the toolbar prop to disable it completely.

from react-quill.

diepvv avatar diepvv commented on July 22, 2024 9

you can fix:
Editor.modules = {
toolbar: false,
};

from react-quill.

thienanle avatar thienanle commented on July 22, 2024 5

Bug: when toolbar prop changes, the editor loses focus.
For example, if I want to hide the toolbar until I click on the editor, I have to click on the editor, then click again to start editing.

from react-quill.

jellanarta avatar jellanarta commented on July 22, 2024 3

import React, { useState } from 'react'
import ReactQuill from 'react-quill'; // ES6
import 'react-quill/dist/quill.snow.css';
export default function Editorhtml() {
const [value, setValue] = useState('')
const changevalue = e => {
setValue(e)
}
const modules = {
toolbar: false
}
console.log(value)
return (
<ReactQuill value={value} modules={modules} placeholder={'Deskripsi produk'}
onChange={changevalue} />
)
}

from react-quill.

brucedlukens avatar brucedlukens commented on July 22, 2024

I found a way to do it, I just called the toolbar class (ql-toolbar and set it to display: none !important when it's inside of certain divs.

from react-quill.

zenoamaro avatar zenoamaro commented on July 22, 2024

I should provide you with a better, official way to disable the toolbar. Stay tuned.

from react-quill.

RayOconnor avatar RayOconnor commented on July 22, 2024

@brucedlukens I disabled the toolbar by using css to set display to none for react-quill edit boxes with a specific file name

actually sass:

  div.blurred-editor div.ql-toolbar
    display: none

I made a variable in the state called focused
when rendering ReactQuill I set the className dependent on the state

<ReactQuill
     className={this.state.focused ? "focused-editor" : "blurred-editor"}
     value={"yada yada yada"}
     theme="snow"/>

when the user focuses on the container component of react quill, I this.setState({focused: true})
when the user blurs on the container component of react quill, I this.setState({focused: false})

from react-quill.

chandra1899 avatar chandra1899 commented on July 22, 2024

how can i enable and disable toolbar dynamically ?

from react-quill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.