Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
Using TinyMCE with WordPress. Multiple editors on the same page. tinymce.editors array is empty if editors were loaded in text mode

I'm using TinyMCE with WordPress. I need it as a part of my custom WordPress plugin. So there is a page containing multiple TinyMCE editors, each with different ID. Each of them was created with wp_editor() function. When user performs an action like clicking the button I want to set content of the particular editor using tinymce.get("exampleID").setContent(). That works fine as long as TinyMCE was loaded in Visual Mode. Like there are 2 modes: visual and text.

When user changes to the text mode, leaves the page and come back later these TinyMCE editors will try to load in the text mode instead of visual one. But here is my problem: if these editors are loaded in text mode these are not in the tinymce.editors array and using tinymce.get() will result with javascript error saying it's null. If user switches back to visual mode, that particular editor will appear in the tinymce.editors array. So user needs to switch each of editors back to visual mode so these will be pushed to tinymce.editors array.

Currently I just hide the toggle mode buttons but I would know if there is any solution for that.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda