Geomantics.net
 
Geomantics Ltd.
Cluanach, Auchtubhmor,
Balquhidder, Lochearnhead,
Scotland FK19 8NZ
Tel/FAX +44 1877 331558
sales@geomantics.net
 

Main Page
tGedit FAQ
Download tGedit

  
tGedit HTML Editor

This example shows tGedit Pro embedded in a form. Using tGedit is simple and in most cases it can be substituted for a <textarea> tag within a few minutes. Multiple copies per form is supported in the pro version.

Recent Development Highlights
Version 2.2 of tGedit is available for PHP and Cold Fusion. This page demonstrates the PHP version.

This version of tGedit Pro supports both Internet Explorer and Mozilla browsers (Firefox, Mozilla, Netscape etc.) so your users are not limited to Windows. This latest version is also skinnable, supports multiple languages and improves table editing.

tGedit Pro included the ability to pass in data in and out from an element on a web page without having to use and submit a form. For example you can edit the following two paragraphs inline.

tGedit is an ideal solution for commercial developers as it is redistributable when embedded in your application. All we ask is that the total size of your commercial project's source code is at least 5 times that of the tGedit source and that your application is sold for more than twice the cost of tGedit.
What our users think of tGedit...
  Just wanted to drop you a line and let you know the tGedit tag is awesome - Jerry Flanagan.
  I did want to comment on how great I think your product is, being very flexible and generous licensing agreement. I have been looking around for months for an inexpensive, distrubutable solution. Most apps are way more expensive and less features, and can only run on 1 domain. Kudos for distributing your version. - Peter Cronin (Plexsys Technologies)
  I am making about 1k extra a month because of your tool. I have about 10 customers that update their site with it. Thanks!! - Brad Wilson

Check out tGedit's features here by editing the document below.


Insert Special Character
      loading...      

We used the following code for the editor form (pro version):

<form action="" method=post name="mainform">
  <br>
<input name="Submit" type="Submit" value="Update">

<?
include "tgedit.php";

$vals = tgedit_init();
$vals["width"]="570";
$vals["height"]="300";
$vals["html"]="Hello <b>World<b>";
$vals["field"]="txtArticle";
$vals["form"]="mainform";
$vals["complete"]="false";
$vals["imgpath"]="./tgimages/";
$vals["editHTML"]="false";
$vals["baseURL"]="http://www.geomantics.org.uk/tgphp/";
$vals["absimgURL"]="http://www.geomantics.org.uk/tgphp/";
$vals["editor"]="myeditor1";
$vals["initiallocation"]="./";
$vals["defaultbgcolor"]="#eeeeff";
$vals["shownew"]=true;
$vals["defaultfontsize"]="12pt";
$vals["defaultfontcolor"]="#F04080";
$vals["defaultfontname"]="Tahoma";
$vals["allowdeleteimage"]="false";
$vals["stylesheet]"]="sitestyle.css";
$vals["toolbarcolor"]="#EFEFDE";
$vals["infobarcolor"]="#EFEFDE";
$vals["editorborder"]="1";
$vals["editorborderstyle"]="all";
$vals["editorbordercolor"]="#EFEFDE";
$vals["editorbgcolor"]="#EFEFDE";

tGedit($vals);

?>
</form>

 

Parameters
width width of the editor on the page
height height of the editor on the page
field fieldname of the editor in the form
form name of the form tGedit is being used in
imgpath path to tgedits image directory
complete set to true to include page html headers/footers. Defaults to false
edithtml set to true to open editor in HTML edit mode. Defaults to false (WYSIWYG mode)
baseurl url of the directory where tgedit is being used. Must include trailing '/'. We've shown a hardcoded address here but typically a CF variable or function would be used.
editor name of the editor.
html initial contents of page. Here set to 'hello world' to demonstrate, but typically a Cold Fusion variable would be used to edit an existing page.
initiallocation This tag allows you to specify a different initial source folder for images from the folder where tGedit is located. Useful when setting up administration areas for websites.
absimgURL If present images are processed as absolute URL rather than as relative links.
multipleinstance This tag is required if placing a second or subsequent copy of tGedit into a form, when it should be set to true. tGedit configures itself to reuse most internal routines and the download size of the second instance is reduced by over 70%.
fontlist List of available fonts in dropdown box. Default "Arial, Tahoma, Courier New, Times New Roman, Verdana, Wingdings"
fontsize List of available font sizes in dropdown box. Default "1,2,3,4,5,6,7"
formatlist List of available formats and decodes - may use stylesheet attributes, for examples "Normal,normal,Heading 1,h1,Question,p class=question,Answer,p class=answer" would list 4 formats - Normal, Heading 1, Question and Answer - where Question and Answer are defined in you stylesheet. Note no spaces between commas in list.
defaultbgcolor Default background color (e.g. ##FF0000 - note use of two # symbols)
defaultfontcolor Default font color (e.g. ##0000FF - note use of two # symbols)
defaultfontname Default font name
defaultfontsize Default font size
removetbody Defaults to false. If set to true all tbody elements are removed when source is submitted
stylesheet Relative link to stylesheet to be used for editor display
initializetimer Initial timer delay. Default 250 ms. May be increased for old (early pentium) clients
allowdeleteimage Toggles whether to allow user to delete images in the image manager
allowuploadimage Toggles whether to allow user to upload images in the image manager
shownew Toggles whether to display the New button
showedits Toggles whether to display the edit buttons (cut, copy, paste)
showundo Toggles whether to display the undo and redo buttons
showtables Toggles whether to display the table editing buttons (table manager plus associated buttons)
showbackground Toggles whether to display the background color button
showimages Toggles whether to display the image manager button
showlinks Toggles whether to display the link manager button
showfonts Toggles whether to display the font type and size dropdown lists
showtextstyle Toggles whether to display the font style buttons (bold, italic, underline)
showfontcolors Toggles whether to display the font color buttons (font and background colors)
showpara Toggles whether to display the paragraph style (align left, centre, right)
showlists Toggles whether to display the list buttons (unordered list, ordered list, indent, outdent)
showtogglesource Toggles whether to display the edit source toggle button
showtoggleborders Toggles whether to display the show table borders toggle button
showtoggledetails Toggles whether to display the show details toggle button
showfeedback Toggles whether to display the feedback text (loading, editing source etc.)
showcodeclean Toggles whether to display the code cleaner tool
showspecial Toggles whether to display the special characters combo
showgeologo Toggles whether to display the show geomantics link button
fullpagein Toggle to tell editor if you are sending it a full page for editing (i.e. including <HEAD> etc elements.
openersource Pointer to element ID on calling page containing HTML to be edited. Using this parameter the normal <FORM> submit method for saving text can be overwritten and edited HTML taken from and placed directly back into a paragraph, table, textarea or other element.
toolbarcolor Color used for toolbar. Default silver.
infobarcolor Color used for infobar. Default silver
editorborder Width of editor border. Default 1.
editorborderstyle Editor border style. Default 'All'
editorbordercolor Editor border color. Default silver.
editorbgcolor Editor background color. Default silver.