Skip to main content

Close
Get the best research tool on the web today,and free!
Connect with people with common interests!
Play Webslides

Kristen Kozloski's Bookmarks tagged opensource   View Popular

You are here: Diigo Home > Kristen Kozloski's Bookmarks

Expand All 1 - 2 of 2

openWYSIWYG - Online Documentation

3.i. How do I add openWYSIWYG to my web page or web application?

You can easily add openWYSIWYG to your content management system or custom web application by just adding a few simple lines of JavaScript code.

1. Near the beginning of the web page to which you plan to add openWYSIWYG insert the following line of code before the closing </head> tag.
Include the following:
<script language="JavaScript" type="text/javascript" src="/your_directory_path/openwysiwyg/wysiwyg.js"></script>

Where your_directory_path is the path to your openwysiwyg directory.

2. Next, add opening and closing <textarea> tags where you plan to include your WYSIWYG editor. You'll also want to give your <textarea> an ID value.
Example <textarea> code:
<textarea id="your_textarea"></textarea>

Your <textarea>'s ID should be something unique.

3. Finally, add the following JavaScript code just below your closing </textarea> tag.
Example JavaScript code:
<script language="JavaScript">
generate_wysiwyg('your_textarea');
</script>

The value you pass to the generate_wysiwyg function (your_textarea) must be the exact same as your <textarea>'s ID.

And that's about it, you've just added openWYSIWYG to your content management system or custom web application with just a few small lines of code.

Tags: opensource on 2008-04-21 -All Annotations (0) -About

more fromwww.openwebware.com

1 - 2 of 2
List 20 50 100

Notation: * = Private bookmark and comment| = Clipping [?] | = Public highlight [?]