Examples

External buttons

    This example shows how to set up the Click-to-Edit mode.

    Demo

    Code

    <!-- buttons -->
    <button id="btn-save" style="display: none;">Save</button>
    <button id="btn-cancel" style="display: none;">Cancel</button>
    
    <!--element -->
    <textarea id="content"></textarea>
    
    <!-- call -->
    <script>
    $R('#content', {
        clickToEdit: true,
        clickToSave: '#btn-save',
        clickToCancel: '#btn-cancel',
        callbacks: {
            clickSave: function(html)
            {
                // send html to your server
            },
            clickCancel: function(html)
            {
                // some canceling functionality
            }
        }
    });
    </script>