AI Tools

Extends the capabilities of the editor with intelligent features such as text writing, grammar checking, translation into other languages, and so on, simplifying content creation and editing processes.

This plugin is a paid add-on. You need to buy Redactor together with AI Tools plugin if you don't have it yet. Or buy the plugin separately in your account if you already have Redactor.

This shows only a demonstration of how the plugin works, you can find the details of customization and usage in the documentation.

Select the text and click the sparkles button on the toolbar or the '+' (plus) button to start interacting with AI.

Code

<!DOCTYPE html>
<html>
    <head>
        <title>Redactor</title>
        <meta charset="utf-8">

        <!-- css -->
        <link rel="stylesheet" href="/your-folder/redactor.css" />
    </head>
    <body>
        <!-- element -->
        <textarea id="entry">...</textarea>

        <!-- js -->
        <script src="/your-folder/redactor.js"></script>
        <script src="/your-folder/plugins/ai/ai.js"></script>

        <!-- call -->
        <script>
        Redactor('#entry', {
            plugins: ['ai'],
            ai: {
                text: {
                    url: '/path-to-server-side/',
                    endpoint: 'https://api.openai.com/v1/chat/completions',
                    model: 'gpt-3.5-turbo',
                    stream: true
                },
                image: {
                    url: '/path-to-server-side/',
                    endpoint: 'https://api.openai.com/v1/images/generations',
                    model: 'dall-e-3'
                }
            }
        });
        </script>
    </body>
</html>