Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
Config Quill Text Editor for Read Only and prefilled content. React.js

I have a basic setup for a Quill text editor. I want to figure out the config needed for Quill to be read only with prefilled content so that the editor's content is static and the toolbar should be removed.

When I try to change the config with new quill(editor, {configs}); the editor goes away and I'm left with a blank screen. When I used the same exact code on a separate web app the text editor's toolbar was removed but the content was not prefilled and it was still able to be edited.

I've been quite lost looking through the Quill documentation so I appreciate any ideas to get me back on track. Thank you for your time!

import { useCallback} from "react";
import quill from "quill";
import "quill/dist/quill.snow.css";
export default function TextEditor() { 
    const wrapperRef = useCallback(wrapper => {
        if (wrapper == null) return 
        let configs = {  theme: 'snow', readOnly: true, placeholder: 'HELLO!!!' };
        wrapper.innerHTML = ""
        const editor = document.createElement
        ("div")
        wrapper.append(editor);
        new quill(editor, {theme: "snow"});
    } , []); 
    return (
        <div>
    <div   className="container" ref={wrapperRef }/>
    </div>
    )
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda