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

213
Views
Adding undo levels to TinyMCE

I am using the tinyMce editor to edit PDFs. I want to try and preserve the undo stack from when I close the editor. To do this I serialise the undoManager.data and store it in the metadata of the PDF. Then when loading the document I read the PDFs metadata and deserialise the data. I then run into an issue when trying to add this data back into the undo manager. I am trying to add extra undo levels to the undoManager using: undoManager.add(newUndoLevel)

This works fine and in undoManager.data I can see I have an array with 1 undo element. The issue I am having is that this will only work once. If I try to add a 2nd undo level nothing happens. I can see in the source code that there is an undo level parameter and from what I can gather to add a second undo level I would have to do this: undoManager.add(anotherUndoLevel, {data: 1})

Unfortunately this doesn't do anything either. I have tried many different combinations of this to no avail. If anyone knows the correct way to do this, please let me know

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