Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

120
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda