Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Highlight.js "No se pudo encontrar el idioma 'indefinido', ¿olvidó cargar/incluir un módulo de idioma?"

Estoy usando Highlight.js para los bloques de código del editor Froala en React. Pero me estoy poniendo en error. Usé la función registerLanguage pero no funcionó.

Error en el navegador:

ingrese la descripción de la imagen aquí

Aquí está mi código:

 import FroalaEditor from 'react-froala-wysiwyg'; import hljs from 'highlight.js'; import javascript from 'highlight.js/lib/languages/javascript'; import 'highlight.js/styles/androidstudio.css'; hljs.registerLanguage('javascript', javascript) export default function Editor({ handleEditor, data }: EditorType) { return ( <div className="unreset"> <FroalaEditor tag="textarea" onModelChange={handleEditor} model={data} config={{ placeholderText: '', events: { //editor event contentChanged: function () { //.fr-element is editor wrapper tag document .querySelectorAll('.fr-element pre') .forEach((el: any) => { // WARN: Falling back to no-highlight mode for this block. hljs.highlightElement(el); }); }, }, }} /> </div> ); }

¿Por qué no funciona? Gracias.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!