How to toggle inline editing

How to toggle inline editing

ngungongungo Posts: 64Questions: 23Answers: 2

I would like to have the inline editing feature, but not all the time. I am thinking of implementing a toggle button, but how. Any hint or example would be appreciated. Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin
    edited January 2018 Answer ✓
    var inlineEnabled = true;
    
    $('#example').on( 'click', 'tbody td', function (e) {
      if ( inlineEnabled ) {
        editor.inline( this );
      }
    } );
    

    Have another event listener (or whatever) that controls inlineEnabled so it can be disabled when you don't want it.

    ALlan

This discussion has been closed.