I'd like to do the following efect:
1. The user click on the "Save" button, but the page don't submit.
2. A function will be called to save the contents by ajax.
I don't know how to do that in CKEditor.
Please help me & Thanks in advance.
Jasper
1. The user click on the "Save" button, but the page don't submit.
2. A function will be called to save the contents by ajax.
I don't know how to do that in CKEditor.
Please help me & Thanks in advance.
Jasper
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
Nobody answer?
Can't wait the answers. So I found another way to do this.
I created a new plugin named saveajax. It'll do the job for me.
About how to create custom plugin, please see this:
http://ajithmanmadhan.wordpress.com/200 ... ar-button/
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
Isn't there anybody out there that can help?
Seems like more than one person is looking for an answer to this (me too)...
thanks
Steven
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
I think setInterval is the way for your solution, but I don't know why the function doesn't exist.
Can you give me some sample files to take a test. Maybe I can find out why.
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
First:
In the Init, it can't know what editor is...
So you should write like if(doAutoSave) setInterval(doAutoSave,30000); while doAutoSave is a javascript function. And you should refer your editor like CKEDITOR.instances.TextBody.getData();
Second:
Write your setInterval outside the init function. I write javascript with jquery here.
You should write like this:
<script language='javascript'>
setInterval(doAutoSave, 30000);
function doAutoSave()
{
var data = CKEDITOR.instances.TextBody.getData();
$.ajax(.......)
}
</script>
Re: How to get "Save" button event? I want to save by
A million thanks!
Re: How to get "Save" button event? I want to save by
TextBody is the ID of the textarea.
You can check some CKEditor samples to figure out.
Re: How to get "Save" button event? I want to save by
However, I wish there is a way to change the icon of the button when it's doing the ajax call, and change back when it's done, so users know their draft was saved. is there a way to change the icon path and then change it back for a button? I guess it would also be nice to change the label to reflect the last time their draft was saved.
my plugin code is reproduced below for those who might be interested. ajaxAutoSaveCmd is defined in the same format as the 'save' command. just go to the stock 'save' plugin and look at how they do it. pluginName is defined as
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
how does a person install this modification to fresh install of the editor?
what if any supporting addons need to also be added?
thank you very much
this autosave, will surely be a lifesaver
Re: How to get "Save" button event? I want to save by
I did an autosave function on my form using,
It worked a treat and all the content is going to the database but now if i hit enter twice it wont save anything after it so i put some text like this:
line one
line two
It will only save the first line with the text 'line one'
have you encountered this. Any help will be great.
Thanks
Nick
Re: How to get "Save" button event? I want to save by
I'm a newbie in the area and can't put this to work, can i have some help ?
Re: How to get "Save" button event? I want to save by
Re: How to get "Save" button event? I want to save by
I put this autosave function to work but now i'm having a problem, it isn´t working with two or more instances of the editor. The autosave works for the first one but don't work to the others. Can anyone help me with this?
Re: How to get "Save" button event? I want to save by
For autosave and AJAX manual save please have a look at this plugin:
http://cksource.com/forums/viewtopic.php?t=24128