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

398
Views
TinyMCE getContent devuelve nulo

Estoy tratando de sacar el HTML sin procesar del editor TinyMCE. Aquí está el código que estoy usando

 tinymce.init({ selector: 'textarea', plugins: 'a11ychecker advcode casechange export formatpainter image editimage linkchecker autolink lists checklist media mediaembed pageembed permanentpen powerpaste table advtable tableofcontents tinycomments tinymcespellchecker', toolbar: 'a11ycheck addcomment showcomments casechange checklist code export formatpainter image editimage pageembed permanentpen table tableofcontents', toolbar_mode: 'floating', tinycomments_mode: 'embedded', tinycomments_author: 'Author name', }); console.log (tinymce.get('content-text'))

En la consola dice nulo. También he usado la función de editor activo.

 console.log (tinymce.activeEditor.getContent())

al hacer esto me da error

 Uncaught TypeError: Cannot read properties of null (reading 'getContent') at contact-us.html:62:43

Estoy usando TinyMCE versión 6.1

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Coloque el <script> debajo del <textarea> y vuelva a intentarlo.

O intente agregar ID en la etiqueta de área de textarea como

 <textarea id="tinyarea"> ... </textarea>

y cambie el selector en el js a

 selector: 'textarea#tinyarea',
about 4 years ago · Santiago Trujillo Report
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!