Wysing = Wysiwyg
Wyswing = Wysiwyg
Browser Based HTML Editor:
There are many places where you can find the different type of tools which helps you to create your own WYSIWYG editor. I found a place which explains the rich text editor in HTML completely and clearly. Please follow the link to know more about building a WYSIWYG editor:
Previously mentioned rich text editor does not work properly on all browser. They are suitable to work with Microsoft Windows Internet Explorer.
Rich Text Editor (for text areas):
This is another simple installation to insert rich text format into your textarea forms. With this technique, you can replace a form’s textarea field(s) with a custom one that supports WYSIWYG formatting with Rich Text Editor script. It allows the user to easily format the entered content, such as make it bold, change its size, colors etc. The resulting source code is then submitted as the regular text for further processing by your form script.
The main peculiarity of this script is that this script works in IE5+/Mozilla 1.3+/Mozilla Firebird/Firefox 0.6.1+/Netscape 7.1+. In Mozilla, it relies on the Mozilla Rich Text. This script is contributed by Kevin Roth.
Simply download the zip file rte.zip (right click, select “Save As”), which contains all the necessary files for the script. Included is also “install.htm”, our quick guide to adding the script to your form. For easy reference, the installation instructions are shown below as well.
Basic Installation Steps:
- Step 1: Insert the below script into the HEAD section of your page:
**Note: Alternatively, you can insert the below code instead to reference the original, non compressed version of the .js file instead. This file is significantly larger than the compressed version, though the source is human readable:
- Step 2: Inside the zip file you downloaded, upload the files:1) The relevant .js file you have chosen above2) The sole .css file included in the zip file3) Palette.htm, blank.htm, and “insert_table.htm”4) The entire images directory
Upload the above to your web page directory, in the same directory where your form is in.
- Step 3: Inside your form where you wish the rich text editor to appear, add the below code:
<!– //Usage: writeRichText(fieldname, html, width, height, buttons, readOnly) writeRichText(‘rte1’, ‘here’s the “<em>preloaded</em> <b>content</b>”‘, 400, 200, true, false); //–> </script>
As you can see, you can control the initial content and dimensions of the rich text editor. “rtel” is the name of the text editor, which can be arbitrary but should be unique.
- Step 4: Finally, just before the form containing the rich text editor is submitted, the script needs to sync the value contained within the editor to ensure it gets properly submitted. To archive this, a special function needs to be attached to the onSubmit event of your form. This is shown below:
<form name=”myform” onsubmit=”return submitForm();”>
Don’t be intimated by Step 3. Basically, just add the above script containing function submitForm() to your form, and attach it to the onsubmit event handler inside the form tag.