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

  • Home
  • SEARCH
  • 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 8329963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:58:06+00:00 2026-06-09T01:58:06+00:00

I hava an textarea and I am using tinyMCE on that textarea. What I

  • 0

I hava an textarea and I am using tinyMCE on that textarea.

What I am doing actually is that when the page is opened, I am populating the textarea with some text, and after that I am initializing the tinyMCE.

The problem is when I am trying to change the value of the textarea after tinyMCE initializing, then nothing happens.

Here is an example.

  1. Creating the textarea:

    <textarea style="width: 95%;" name="title"  id="title"></textarea>
    
  2. Populating the textarea:

    $('#title').html("someText");
    
  3. Initializing tinyMCE

    tinyMCE.init({
            // General options
            mode : "specific_textareas",
            theme : "advanced",
            width: "100%",
            plugins : "pagebreak,paste,fullscreen,visualchars",
    
            // Theme options
            theme_advanced_buttons1 : "code,|,bold,italic,underline,|,sub,sup,|,charmap,|,fullscreen,|,bullist,numlist,|,pasteword",
            theme_advanced_buttons2 :"",
            theme_advanced_buttons3 :"",
            theme_advanced_buttons4 :"",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            valid_elements : "i,sub,sup",
            invalid_elements : "p, script",
            editor_deselector : "mceOthers"
        });
    
  4. I would like to change the content of the textview (but it is not working)

I have tryed to use the same as before init the tinyMCE

    $('#title').html("someModifiedText"); // does not work

I have also tryed to remove tinyMCE:

    if(tinyMCE.getInstanceById('title'))
    removeTinyMCE("title");

With

function removeTinyMCE (dialogName) {
    tinyMCE.execCommand('mceFocus', false, dialogName);
    tinyMCE.execCommand('mceRemoveControl', false, dialogName);

}

And thet to reuse:

    $('#title').html("someModifiedText"); // does not work

I am out of ideas… Thank you very much for your help….

  • 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-09T01:58:08+00:00Added an answer on June 9, 2026 at 1:58 am

    Problem here is you won’t see anything if you enter text or html into your textarea.
    Your textarea gets hidden when tinymce gets initialized. What you see then is a content editable iframe, which is used to edit and style content. There are several events which will cause tinymce to write its content to the html source element of the editor (in your case your textarea).

    If you want to set the content of the editor (which is visible) you will need to call something like

    tinymce.get('title').setContent('<p>This is my new content!</p>');
    

    You may also acces the dom elements directly using the following

    tinymce.get('title').getBody().innerHTML = '<p>This is my new content!</p>';
    

    or using jQuery

    $(tinymce.get('title').getBody()).html('<p>This is my new content!</p>');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hava a UITextView ,and after some characters' input, I want to use a
I hava a thread in which I have an infinite loop, doing some network
I hava a RadioButtonList control on my page that has multiple option.I want to
I hava a functoin that call himself occasionally, that function has some asynchronous call
I hava a servleta that serves files? I'm building a page with a Download
I hava a problem with an error in ADT Plugin. I want to make
I hava a CSV file that I want to treat as source code. Essentially
i hava two text boxs in flex.have to add two txt boxs values in
I hava a data window object, in which I am fetching some attributes from
I hava a function that looks something like this: require(config.php); function displayGta() { (...

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.