Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-10-14 07:58:16

the moose
New member
Registered: 2010-10-14
Posts: 2

Autosave

Hi there

I've got a PHP script that has a couple of forms. On those pages, there is one or two xinha HTML edit boxes.

I'm having an issue where my server is timing the sessions out and logging the user off whilst they are typing in the xinha editor.

I would like to use some script to 'autosave' everything to the database. I can write the PHP script to save into the database...and could probably write the AJAX (at a push!!) to do this every minute or so. What I can't seem to do is get whatever HTML is in the xinha editor.

Any ideas?

Thanks!!

Offline

#2 2010-10-14 08:18:05

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Autosave

yourEditor.getHtml()

James Sleeman

Offline

#3 2010-10-14 09:44:19

the moose
New member
Registered: 2010-10-14
Posts: 2

Re: Autosave

Thank you very much for that...but being a bit thick (!!), where/how would I use that in context?!

Cheers

Last edited by the moose (2010-10-14 09:44:28)

Offline

#4 2010-10-14 18:50:39

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Autosave

function yourAutoSaveFunction()
{ 
  var html = xinha_editors.yourEditor.getHTML();
  doStuffWith(html);
}

James Sleeman

Offline

Board footer

Powered by FluxBB