Installation

Redactor is a javascript program that helps you to create word-processed texts on the web. Redactor uses the jQuery library.

Redactor requires jQuery 1.8 or higher.

To install Redactor, place the following code between the <head></head> tags:

<link rel="stylesheet" href="/js/redactor/redactor.css" />
<script src="/js/redactor/redactor.js"></script>

If your Redactor download is placed in a different folder, don't forget to change file's paths.

You can call Redactor using the following code:

<script type="text/javascript">
$(function()
{
    $('#content').redactor();
});
</script>

This code may also be placed between the <head></head> tags or at any other place on the page.

Finally, you need to place a <textarea> element with ID "content" (or with the ID that you set during Redactor's call). This element will be replaced by the visual representation of the Redactor.

<textarea id="content" name="content"></textarea>

Gathering everything:

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

        <script src="/js/jquery-2.0.1.min.js"></script>

        <link rel="stylesheet" href="/js/redactor/redactor.css" />
        <script src="/js/redactor/redactor.js"></script>

        <script type="text/javascript">
        $(function()
        {
            $('#content').redactor();
        });
        </script>
    </head>
    <body>
        <textarea id="content" name="content"></textarea>
    </body>
</html>