logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-26-2008, 12:36 PM   #1
TimAllmark
 
Join Date: Aug 2008
Posts: 2
Default HELP !! Spry submit with TinyMCE/FCKeditor

Can anyone help me?

The setup is a basic CMS using TinyMCE. I select the page I wish to edit and the correct content is loaded into the editor.

Can anyone tell me why when using the following script to submit the form containing the text editor, (either TinyMCE or FCKeditor) the first time you submit it sends the contents prior to editing, and only by submitting the form again will the updates be saved. The upshot being I have to hit submit on the form twice before the edits are saved

Here is the code for the form:

<form method="post" action="#application.myself##xfa.cms_save#" id="text_editor" name="text_editor" onsubmit="return Spry.Utils.submitForm(this, updateResponseDiv)">
<cfif isDefined('attributes.page')>
<input name="page_loc" type="hidden" value="#attributes.page#" />
</cfif>
<textarea name="content" cols="70" rows="20">
<cfif NOT isDefined('admin_cms_content')>
Please select a page.
<cfelse>
#admin_cms_content#
</cfif>
</textarea>
<br />
<cfif isDefined('attributes.page')>
<input type="submit" value="Save" />
</cfif>
</form>

Any help would be grateful as this has bugged me for a while now.

Cheers

Tim
TimAllmark is offline   Reply With Quote
Old 08-27-2008, 01:03 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

if the page containing the submit form has connection to the tinymice ( or FCK) you should have the editing buttons below the form fields.
for ie, in the head,
Code:
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
    // Notice: The simple theme does not use all options some of them are limited to the advanced theme
    tinyMCE.init({
        mode : "textareas",
        theme : "simple"
    });
</script>
<!-- /tinyMCE -->
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 08-27-2008, 10:59 AM   #3
TimAllmark
 
Join Date: Aug 2008
Posts: 2
Default Already there

I have the following code in the head of the page:

<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced"
});
</script>

I think it has something to do with the spry submit as I had the same problem with FCK. And i'm just submiting the form via the standard form "submit" button. As you can see from the code I have the advanced toolset below the editor window.

Cheers

Tim
TimAllmark is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com