Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:29:37+00:00 2026-06-09T03:29:37+00:00

I have a textarea that has tinyMCE applied to it when the dialog is

  • 0

I have a textarea that has tinyMCE applied to it when the dialog is opened (dialog from JQuery UI).

The problem comes when a user wants to edit a record description that is different to a record they previously edited. When the dialog loads I need it to clear everything in the textarea from before and insert the new text from AJAX.

Basically, I initialise TinyMCE on the textarea when the dialog opens. I then want TinyMCE to be destroyed so I can clear all inputs and textareas when the dialog is closed.

How can this be done? I have tried .remove() and .destroy on the TinyMCE object but it either does nothing or causes an error.


I have tried:

tinyMCE.execCommand("mceRemoveControl", false, 'textarea_id');

But that doesn’t work either 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:29:39+00:00Added an answer on June 9, 2026 at 3:29 am

    To shut down an editor instance correctly use:

    tinyMCE.execCommand("mceRemoveControl", false, 'textarea_id');
    

    This is necessary when you move the editor around inside the dom or when you remove parts of the dom containing the editor iframe.

    To reinit this unique editor instance use

    tinyMCE.execCommand("mceAddControl", false, 'textarea_id');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a textarea tag that has text I want a user to edit.
I have a textarea element inside of a jquery modal dialog that has an
I have a textarea that I'm able to edit with the jeditable plugin but
If I have a variable that contains text information (say taken from a textarea),
Please see this jsFiddle: https://jsfiddle.net/Wmq6f/ I have a textarea that has a background image,
I have a Textarea which is in a form that has this value Hello<div
I have an app that has text appended to a TextArea (TA). It automatically
I have a textarea that includes information. It has an onfocus attribute which selects
I have a page that shows information from my database. Each array has an
I have a textarea that contains code. The problem is, that in order for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.