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

220
Visualizações
Problem rendering inline tex with draftjs-latex-plugin

I am using draft-js-latex-plugin package to implement Tex in my Draft-JS editor. The documentation of the package says the following:

Press $ for starting Inline TeX Press CMD + M for starting Tex Block To write the $ character, type $

Now when I press $, an empty space comes in instead of inline-Tex (sometimes it occurs sometimes not, randomly).

Problem is to change that empty space to inline-tex component.

Here is how I implemented the plugin (avoided the rest of the code):

...
import { getLaTeXPlugin } from "draft-js-latex-plugin";
import "draft-js-latex-plugin/lib/styles.css";
import "katex/dist/katex.min.css";

const DraftEditor = props => {
   ...
   const LaTeXPlugin = getLaTeXPlugin();
   const plugins = [LaTeXPlugin];
   return <Editor
          customStyleMap={highlightStyleMap}
          ref={editorRef}
          handleKeyCommand={handleKeyCommand}
          editorState={editorState}
          onChange={changeHandler}
          plugins={plugins}
        />
}
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