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

119
Vistas
TinyMCE public methods to parse HTML like paste plugin in other editor

I have two editors in my application. One is tinyMCE and other is different one. Is there any tinyMCE public methods that I can use to filter html tags and css that I can use for other editor.

pasteRetainStyleProperties = ['font-weight', 'font-style', 'font-size'];
pasteValidElements = ['b', 'strong', 'i', 'em'];

This is similar to the tinyMCE 4 feature. However I have to filter HTML string in the similar way. I am trying to build this for other editor. Hence I am wondering instead of building it from scratch is there any tinyMCE methods that I can use outside tinyMCE. Or any other 3rd party library help me achieve the same.

Any help would be greatly appreciated.

Thanks, Shridhar

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

0

I believe, TinyMCE 5 has almost exactly the same options as that you've mentioned in the code block:

  • paste_retain_style_properties
  • paste_word_valid_elements

However, all the settings, defined in the tinymce.init() function cannot be changed without reinitialization. Reinitialization can be done very fast. You will need to perform 4 steps:

  1. Save current content somewhere with getContent()
  2. Destroy the TinyMCE instance with destroy()
  3. Reinitialize
  4. Use setContent() to add the content saved on step 1.
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