Oops, you need to build the package before running this example. It's easy: just run rake in the project's directory.

This is a simple example of how easy it is to get up and running with WysiHat.

  document.on("dom:loaded", function() {
    // Replaces the textarea 'content' with the wysiwyg editor on load
    var editor = WysiHat.Editor.attach('content');

    // Create a simple toolbar bar
    // View the source of this page to see the generated HTML
    var toolbar = new WysiHat.Toolbar(editor);

    // Add the basic set of buttons, bold, underline and italic
    toolbar.addButtonSet(WysiHat.Toolbar.ButtonSets.Basic);
  });