Take a look at our new Article and Redactor X editors.

Get content with API

This example shows how to get the content of Redactor with API and send to the server with jQuery Ajax.


    <!--form -->
    <form action="/server-script/" method="post">
        <!-- element -->
        <textarea id="content" name="content"></textarea>
        <!-- submit button -->
        <button onclick="sendForm();">Send</button>
    <!-- call -->
    <!-- get and send content with API -->
    function sendForm()
        var content = $R('#content', 'source.getCode');
            url: '/savedata-server-script/',
            type: 'post',
            data: 'content=' + content