Skip to content

Getting Started

tiff edited this page Apr 1, 2012 · 29 revisions

Getting Started

1. Include scripts
<!-- wysihtml5 parser rules -->
<script src="wysihtml5/parser_rules/advanced.js"></script>


The first script contains the html5 parser rules that are needed for wysihtml5 in order to create valid and desired markup.
Either use one of the existing parser rules set or create your own. Check the advanced.js parser rules for details.

The second script is the minified wysihtml5 library. It’s located in the dist folder of the repository.

h2 2. Create a textarea

<form><textarea id="my-textarea"></textarea></form>

wysihtml5 takes a textarea and transforms it into a rich text editor. The textarea acts as a fallback for unsupported browsers (eg. IE < 8). Make sure the textarea element has an id, so we can later access it easily from javascript.

Clone this wiki locally