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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:09:15+00:00 2026-05-30T09:09:15+00:00

I have Validation working across a large form (I fire it several times before

  • 0

I have Validation working across a large form (I fire it several times before Submit to check sections of the form), and a tinyMCE editor working in 1 textarea. I want to move the contents of the tinyMCE iframe into the textarea before (that’s the key here – before) the Submit button is pressed so that the contents can be validated in the section before Submit.

I’ve used tinyMCE.triggerSave(); in several ways to move contents and then fire Validation before Submit. None work. I am beginning to believe that tinyMCE contents cannot be moved by any Javascript, rather contents move only via the Submit button, but I don’t see that stated anywhere.

In tinyMCE, I’ve tried onchange_callback: and handle_node_change_callback: to fire functions with triggerSave and other saving commands. I can get the contents of tinyMCE to validate when I press Submit twice (others have noted this peculiarity), but not in any other way.

Also, when errors are corrected in tinyMCE, Validation does not revalidate until Submit is pressed. It should re-validate in real time, as Validation is designed to do.

2 questions –

Anyone know how to move tinyMCE contents into the textarea without hitting Submit?

Does CKEditor allow updates other than via Submit, and if so, where’s a tutorial or example?

Here’s an example of code that is supposed to be triggered by tinyMCE’s onchange_callback, but only triggers upon the second click on Submit.

function tinyMCESetValue(inst)
{
var content = tinyMCE.activeEditor.getContent();
if (tinyMCE.activeEditor.isDirty()) {tinyMCE.triggerSave(true, true);}
// other save expressions that have been tried - with same results
//$("#selector").val(content);
//$("textarea.tinymce").val(content);
//tinyMCE.triggerSave();
//ed.save();
alert("some change"); //does not fire
}

In response to Thariama’s comment, the above code is supposed to be triggered by the tinyMCEinit option of onchange_callback: “tinyMCESetValue”,. I also have the following code in a JS section that does everything else correctly. The alert always shows ‘undefined’. See any problem? Where else should I look/try? What tests can I do – I’m not getting useful info from Firebug.

if ($( "#sections" ).accordion( "option", "active" ) == 1)  //if the second Accordion section
{
    var content = tinyMCE.activeEditor.getContent(); //get the content from the tinyMCE iframe
        if (tinyMCE.activeEditor.isDirty()) //if the contents of tinyMCE have changed}
        {tinyMCE.triggerSave(true, true);} //put contents in the textarea
    alert("|" + $("#detailedDescription").val() + "|tinyMCEval");
    if (i == 7) {$("#detailedDescription").rules("add", {validCharsCheck: true});}
}
  • 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-05-30T09:09:17+00:00Added an answer on May 30, 2026 at 9:09 am

    I found a workaround for this problem .
    i changed jquery.validate.js file.

    this.submit(function (event) 
    { 
        if (window.tinyMCE != undefined) 
        { 
            tinyMCE.triggerSave(); 
        }
        .
        .
        .
    })
    

    this solution only works for tinymce.

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

Sidebar

Related Questions

Form validation for check boxes only seems to be working in IE....? Anyone have
I have jquery validation code which is working fine in ff but the same
I'm currently working on an OO PHP application. I have a class called validation
Possible Duplicate: Text box validation not working Right now I have 5 text boxes
I have the jQuery UI Datepicker and the bassistance.de validation plugin working except for
I have designed a form which was working fine until about an hour ago.
I have a validation check when I pass the command line parameters to the
I have the javascript validation working good for my own code. I want to
I have basic client-side validation working in my MVC3 RC2 application, but I'm now
I have come across a problem when I submit an empty radio input. If

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.