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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:59:34+00:00 2026-05-19T09:59:34+00:00

I am using IsDirty to check for changes in my FCKeditor. Unfortunately, it seems

  • 0

I am using IsDirty to check for changes in my FCKeditor. Unfortunately, it seems that its functions are asynchronous.

Here is the failing code:

var txtObj = $('activities').EstActText1.id;
var oEditor = FCKeditorAPI.GetInstance(txtObj);
oEditor.SetHTML(jsonObj.DATA.ESTACTTEXT1.toString());
oEditor.ResetIsDirty();

The problem is, SetHTML does not take effect immediately (if you put a check right afterward using GetHTML, it will return what was previously in the textarea). Thus, ResetIsDirty will run, THEN the HTML will actually be changed, and the dirty flag will be set again.

Is there any way I can force the SetHTML call to complete before continuing? If not, is there any way (besides a ghetto setTimeout call that will add latency and not necessarily always work) to make sure that the ResetIsDirty will actually take effect after the HTML is changed?

  • 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-19T09:59:35+00:00Added an answer on May 19, 2026 at 9:59 am

    I still would be interested in a direct answer, but I’m leaning on the side of that not being very feasible. It would require something of a sleep function, but JavaScript doesn’t go toward that realm.

    However, what you’re supposed to do is handle the FCKeditor_OnComplete event:

    function FCKeditor_OnComplete( editorInstance )
    {
        editorInstance.Events.AttachEvent( 'OnAfterSetHTML', function(){
            editorInstance.ResetIsDirty(); // clean flag to avoid having to save
        } ) ;
        editorInstance.ResetIsDirty(); //clean flag upon initial load as well
    }
    

    This was placed in a script tag with defer set.

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

Sidebar

Related Questions

Using Play 2.1-RC1 I can't write simple test. Here's the action code: def echoTestTagFromXml
I wrote a small piece of code using the dsofile.dll component to modify document
Using NLTK and WordNet , how do I convert simple tense verb into its
I am trying to break out some methods that I am using across my
Again, Xcode newb here ... So I'm having trouble getting my Items (code not
Using this code, the following execution yields strange results: C 100 R W The
We have a homebrew type that we have been using since .NET 3.5 where
Hi I use this way to play soundeffect SoundEffect _effect; using (var stream =
Background Trying to switch from using Interceptor to Events. I have a ValidationInterceptor that
I am using tinymce editor to provide rich text formatting and along with that

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.