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

118
Views
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 answers
Answer question

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 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!