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

103
Vistas
Get the edited content in tinyMCE 6

I am integrating TinyMCE in my ember.js app. Unfortunately I cannot get back the edited content, or at least, all of it.

    tinymce.init({
      selector: '#'+ this.editorId,
      toolbar: 'undo redo | alignleft aligncenter alignright alignjustify | ' ,
      menubar: false,
      setup: (editor) => {
        editor.on('input', (e) => {
          console.log(e);
        });
      }
    });

the input event is fired every time the content is modified. e contain at best, the last div in the editor and never the whole content in e.rangeParent.textContent.

Is there a way to get back all of the content edited by TinyMCE?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I managed to find a way to do it, I changed the method to initialize tinyMCE from selector to target but it should be easy to use for both method.

  const editors= await tinymce.init({
    target: element //the textarea DOM element
  })
  editors[0].on('input',() => {
    setValue(editors[0].getContent())
  })

It may be a little overkill but I have a case where I want to show live the changes in 2 previews at once.

about 4 years ago · Juan Pablo Isaza Denunciar
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