John Hunt
John Hunt

Reputation: 4072

Setting form values from fckeditor before submit is called

I'm trying to fix a form on a site that uses javascript to validate the fields.

Some fields are using fckeditor, and it turns out that the form field values aren't set until the submit button is pressed - rendering my form validation useless.

What I want to do is (hopefully) just call a method in fckeditor to update the form values it's tied into.

Does anyone know of such a method?

Thanks, John.

Upvotes: 3

Views: 1851

Answers (1)

Gabriele Petrioli
Gabriele Petrioli

Reputation: 196227

Documentation at FCKeditor 2.x / Developers Guide / JavaScript API

FCKeditorAPI.GetInstance('InstanceName').UpdateLinkedField()

for CKEditor from Using jQuery to grab the content from CKEditor's iframe

for ( instance in CKEDITOR.instances )
            CKEDITOR.instances[instance].updateElement();

Upvotes: 2

Related Questions