Menu

#55 AJAX Save Plugin and CTRL+S save option

open
nobody
None
5
2006-06-30
2006-06-23
No

This is a simple plugin that will save the content of
the fckeditor window using an AJAX request.

THIS CURRENTLY ONLY WORKS in IE 6.0

//Add to "fckconfig.js":
FCKConfig.AjaxSaveData = 'fckeditor=';//POST DATA
FCKConfig.AjaxSaveUrl = '';//URL to your server side
save script
FCKConfig.Plugins.Add( 'ajaxsave' ) ;

// the following code can be added to allow the CTRL
+ S key combo to operate the save command
//Add to "fck_1_ie.js" Function Doc_OnKeyDown:
case 83:
case 115:
if(e.ctrlKey){
oCommand=FCKCommands.GetCommand
('AjaxSave');
oCommand.Execute();
return false;
}
break;

Discussion

  • Steve Ramage

    Steve Ramage - 2006-06-23

    AJAX Save Plugin for IE and CTRL+S save option

     
  • Steve Ramage

    Steve Ramage - 2006-06-30
    • summary: AJAX Save Plugin for IE and CTRL+S save option --> AJAX Save Plugin and CTRL+S save option
     
  • Steve Ramage

    Steve Ramage - 2006-06-30

    Logged In: YES
    user_id=262273

    Ajax Save Plugin Works in both Firefox and IE but the
    CTRL+S code is still for IE only!

     
  • Dylan

    Dylan - 2006-07-31

    Logged In: YES
    user_id=1215233

    I am trying to do this plugin for my users (doing this
    with DotNetNuke) and cant seem to get any sort of response
    or even get the menu item to show up - any suggestions?

     
  • Steve Ramage

    Steve Ramage - 2006-07-31

    Logged In: YES
    user_id=262273

    The menu item looks exactly like the original save button.

    What this plugin does:
    When you click the save button, it contacts the url
    specified in the FCKConfig.AjaxSaveUrl variable using ajax
    as opposed to refreshing the whole page to save.
    For example:
    FCKConfig.AjaxSaveUrl='/savemydata.php'
    or
    FCKConfig.AjaxSaveUrl='/savemydata.asp'

    The FCKConfig.AjaxSaveData variable allows you to add
    extra POST data to the request if you need to pass some
    other data. It allows you to rename the variable name for
    the data held within the fckeditor box by default it is
    set to 'fckeditor=' and then the post data for the
    fckeditor textbox is appended to the
    FCKConfig.AjaxSaveData variable and then sent to the url
    in FCKConfig.AjaxSaveUrl.

    I forgot to add that in the fckconfig.js file You must
    replace the "Save" toolbar item with the "AjaxSave".

    example:
    replace
    FCKConfig.ToolbarSets["Default"] = [['Save'...
    with
    FCKConfig.ToolbarSets["Default"] = [['AjaxSave'...

    hope that helps

     

Log in to post a comment.

Monday.com Logo