You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#101469 Autosave of edition view after a time of last key pressed

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 24 October 2019 14:01 BST

sfi
Hello,

We have some jce editor fields in a front-end xml form, in a custom component. Lots of information is writing in each item, and I would like to auto save it 30 seconds after last key pressed in any of the editor fields, calling standard joomla.apply function. I can't detect on key pressed in the editor fields to launch a timer and a function.

Please, is there a way to do it? (javascript, jQuery...)

Thank you!

Ryan
The nodeChange event is probably the best here, or the onChange event, eg:

tinyMCE.onAddEditor.add(function (mgr, ed) {
    ed.onNodeChange.add(function() {
        var content = ed.getContent();

        // you code here
    });

    // or...
    ed.onChange.add(function() {
        var content = ed.getContent();

        // you code here
    });
});

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.