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 8420907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:59:24+00:00 2026-06-10T02:59:24+00:00

Here is the problem. In my php submission page, I have a form with

  • 0

Here is the problem. In my php submission page, I have a form with multiple fields including a textarea which is currently using TinyMCE and I also have an option for duplicating existing form. The thing is I can’t edit the 2nd editor that was duplicated but the editor appear in textarea place. However I can edit and save 1st editor. I am not sure if its a bug or just me doing something wrong? I tried to update TinyMCE as well but didn’t work.. any idea?

function initTinyMCE() {
   tinyMCE.init({
       mode : "textareas", //mode : "exact", elements : "mytextarea"
       theme : "simple"
   });
}
initTinyMCE();


$(document).ready( function(){
    $('a#addmore').live('click', function(){

         //*clone the existing form and inserting form here*
         initTinyMCE(); 
    });

    $('a#toSubmit').live( 'click', function() {
      tinyMCE.triggerSave();
      $('.editwork-form').submit();
});

});
  • 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-10T02:59:26+00:00Added an answer on June 10, 2026 at 2:59 am

    I can’t seem to get .clone() to work, nothing in the debug console either. However, my working solution is as follows, maybe this helps?

    initTinyMCE();
    
    $("#append").live("click", function() {
        var ta_count = $("textarea").length;
    
        var elem = document.createElement("textarea");
        $(elem).attr("id", ta_count.toString());
        $(elem).appendTo("#ta_container");
    
        initTinyMCE();
    });
    
    function initTinyMCE() {
        tinyMCE.init({
            mode: "textareas",
            theme: "simple",
            theme_advanced_path: false
        });
    }​
    

    Instead of .clone()ing the element, I’m just creating a new textarea and appending it to the container (using the count of all textareas on the page as it’s ID to make it unique), then re-calling the tinyMCE initialiser.

    Example jsFiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html page with a php form submission, it's very basic.. what
I have a problem with sorting items in table in PHP. Here is what
I have a z-index problem here: http://ratingscorner.com/product_rating.php?alias=Peoples-Education-Society-Institute-of-Technology-%28PESIT%29-100-feet-Ring-Road-Bangalore&product=Colleges The first level menus go behind the
I'm currently trying to make a page via php which allows the user to
So here's the problem. We have some big dojo forms created using Zend_Dojo_Form. The
I have a page at http://www.problemio.com/problems/problem.php , and you see on the bottom-right I
I have a problem here with the php function substr Let's say I have
I have a form which uses ajax for data submitting. Here is the html:
I have a strange problem here. I am using a directory script running off
I have a basic AJAX form submission function in the head of my page

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.