Jacuba
  • Home
  • Try it Now
  • Add it Now
  • Use it Now
  • Learn More
  • Contact Us

Add Jacuba Spell to Your Website

The following steps should be all you need to add Jacuba Spell to your website. Some example HTML is also available

  1. Open your HTML document in your preferred editor. Jacuba Spell works by replacing text areas

  2. Add the following Javascript include inside the <head> tag of your document:

    <script type="text/javascript" src="http://www.jacuba.com/service/checker/-/-/" defer="defer"></script>

    Please help to promote Jacuba Spell! (optional)

    To help promote Jacuba Spell please add the following code beneath any text area using Jacuba Spell:

    <div>spell checking provided by <a href="http://www.jacuba.com" target="_blank">jacuba</a></div>

    This will be a great help in promoting Jacuba Spell and would be greatly appreciated however this is optional and not required to use jacuba.

  3. Indicate which text areas will be converted into Jacuba Spell editors. To do this add an onload event handler to the <body> tag of your HTML document which applies Jacuba Spell to every textarea on the page. We do this as follows:

    <body onload="if (window.Jacuba) Jacuba.applyTo('element: TEXTAREA')">

    If you already have an onload attribute on the body tag it will be necessary to separate this javascript command from existing commands with a semi-colon. Refer to a basic Javascript guide for details.

  4. View the page in a supported browser to check the result.

    If you have a website which is produced using a HTML template you can make these changes inside the template and add Jacuba Spell to every page of your website. If there are no text areas Jacuba Spell's presence will not be visible to visitors.

  5. The following step is optional:

    It is not necessary to apply Jacuba Spell to every text area in every page. Instead it is possible to specify the criteria of the textareas to which Jacuba should be applied. This is done by changing the string supplied to the applyTo method introduced in step 4. The available criteria are:

    • id which chooses textareas based on their id within the document.
    • name which chooses textareas based on their name within a form.
    • class which chooses textareas based on their style class.
    • element the only element supported at present is TEXTAREA.

    So, as an example, Jacuba.applyTo('id: comments') will apply Jacuba Spell to any text area with the id "comments".

    The applyTo method may be called any number of times with different criteria. Textareas will have Jacuba Spell spellchecking applied to them if they meet one or more of the criteria.

Example HTML

The HTML below provides an example of using Jacuba Spell in a web page.

<html>
  <head>
     <title>Jacuba Sample Page</title>
     <script type="text/javascript" src="http://www.jacuba.com/service/checker/-/-/" defer="defer"></script>
  </head>
  <body onload="if (window.Jacuba) Jacuba.applyTo('element: TEXTAREA')">
    <p>Try Jacuba in the textarea below:</p>
    <textarea></textarea>
  </body>
</html>