Editor - save changes upon leaving element

Editor - save changes upon leaving element

GeorgeHelmkeGeorgeHelmke Posts: 44Questions: 16Answers: 0

The user does not want to have to press enter after doing an inline edit.
I would like to do something like this, but "this" does't support trigger:

        $('input', editor.node()).focusout(function () {
            this.trigger({ type: 'keypress', which: 13, keyCode: 13 });
        });

I am not married to the key press 13 concept, I just want to get the contents saved when they focus out.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin
    Answer ✓

    Use the submitOnBlur option as it is designed for exactly this.

    The form options can be given at initialisation time or when you call one of the editing methods - inline() for example.

    Allan

This discussion has been closed.