Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

How To :: Integrate HTML Editor into Text Areas for Public & Admin View

Quote Reply
How To :: Integrate HTML Editor into Text Areas for Public & Admin View

I noticed there are many users wanting to setup this feature within the GLinks Interface for both Admin and Public view. I have been successful in setting up such feature with very little effort and thought it could be useful to others too.

Demo on Live Site :
http://www.webhostingkit.com/a/cgi/page.cgi?p=addarticle (it shows different form, if user if logged in, however both are using same HTML Editor) to see the working example of this on our website.

In above example, we have very few functions, as we only allow limited formatting in the information being submitted.

Demo on Developers Site (Tiny MCE by MoxieCode)
http://tinymce.moxiecode.com/example_full.php?example=true

You will notice an HTML editor output with all-most all the options one can think of, along with allowing users to change the HTML Text Area size for their input.

Install Option 1
One way would be to simply download the zip file from TinyMCE website and follow the read me file. It took me less than 5 minutes to get everything working.

Install Option 2
If someone just want to get to the point and wants to know about the steps I took, here is the quick rundown:

  1. Upload TinyMCE in a sub-directory outside of cgi-bin
  2. Open the web page in your favorite editor for which you wish to have HTML Editor for text area. In that page add below lines of tag in between <head> .. </head> (Simply make sure to change the URL to exact location on your web site.)

    <script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
    tinyMCE.init({
    mode : "textareas"
    });
    </script>
  3. All Done.. Yeah it is that simple. Smile

Changing Formatting Options
Below are few already available options from MoxieCode website, you can use them or use below link to learn about configuration options, which you can use to create formatting of your own choice.

  1. Simple Theme: http://wiki.moxiecode.com/examples/installation_example_00.html
  2. Advanced Theme: http://wiki.moxiecode.com/...tion_example_01.html
  3. Advanced Theme Full: http://wiki.moxiecode.com/...tion_example_02.html
  4. Advanced Theme Simplified: http://wiki.moxiecode.com/...tion_example_03.html

To learn more about Configuration Options you can visit : http://wiki.moxiecode.com/index.php/TinyMCE:Configuration

Hope this information is as helpful to all of you, as it has been to me.

P.S. You can also setup different formatting options for different forms (both GLinks and Non Glinks Forms). Just change the header javascript for that pages.



Vishal
-------------------------------------------------------
Subject Author Views Date
Thread How To :: Integrate HTML Editor into Text Areas for Public & Admin View VishalT 5734 Jan 26, 2007, 3:08 PM
Post Re: [SWDevil.Com] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
SandraR 5491 Jan 27, 2007, 7:34 AM
Thread Re: [SWDevil.Com] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
SandraR 5510 Jan 27, 2007, 12:52 PM
Thread Re: [SandraR] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
VishalT 5528 Jan 27, 2007, 1:19 PM
Thread Re: [SWDevil.Com] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
SandraR 5508 Jan 27, 2007, 1:51 PM
Post Re: [SandraR] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
hegu 5409 Feb 6, 2007, 9:44 AM
Post Re: [SWDevil.Com] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
katakombe 5364 Feb 25, 2007, 9:22 AM
Thread Re: [SWDevil.Com] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
Clint 5306 Mar 17, 2007, 11:23 PM
Post Re: [Clint] How To :: Integrate HTML Editor into Text Areas for Public & Admin View
VishalT 4966 Apr 26, 2009, 10:11 AM