Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
"jQuery hooks for a rich content editor
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.markdown
jquery.richeditor.js

README.markdown

rich content editor jQuery plug-in

Rich content editor is a jQuery plug-in that creates a content editable area with customisable formatting controls.

Requirements

  • jQuery 1.6+

Usage

Include jQuery and Rich text editor source files in the HTML:

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.richeditor.js"></script>

On DOM ready tigger richEditor by calling it against some target element(s):

<textarea id="comment_form"></textarea>

<script type="text/javascript">
    $(document).ready(function() {
        $('#comment_form').richEditor();
    });
</script>

This will replace the with a HTML block containing the editor controls and editable area.</p> <h2>Methods</h2> <p><em>getHTML</em> Returns the raw HTML of the editable area.</p> <p><em>setHTML</em> Sets the HTML of the editable area.</p> <p><em>disable</em> Disables the editable area and hides the controls.</p> <p><em>enable</em> Enables the editable area and shows the controls.</p> <h2>Examples</h2> <p>You can specify which formating control buttons to display by passing in an options object:</p> <pre><code>$('#create-block-textarea').richEditor({ buttons: ['bold', 'undo', 'redo'] }); </code></pre> <h2>References</h2> <p>For more information about content editable see the following resources:</p> <ul> <li><a href="https://developer.mozilla.org/en/rich-text_editing_in_mozilla">https://developer.mozilla.org/en/rich-text_editing_in_mozilla</a></li> </ul>

Something went wrong with that request. Please try again.