JavaScript in built sites
 
 
 

zeroCode provides the feature of Rich Text Editor, which you can use to format ordinary text to rich text in a textarea. You can change your text to rich text by using the following options: Bold, Italics, Underline, Font, Size, Bullets, Foreground and Background color.

  
The Rich Text Editor is completely designed using JavaScript, which addresses the functional part. The UI is designed using DHTML. When a zeroCode site is generated, Rich Text Editor is embedded as a JavaScript file. This file will be present in following directory structure:“<site_name>/webFiles/javascript”.
You will have the privilege of using the editor where ever you want it  i.e., in any particular template in the zeroCode generated site. 
 
Environmental Specifications:
Server Specifications:
  JDK1.1.8
  JSDK2.0
 
Oracle 8.x
  Oracle JDBC thin driver
 
RedHat Linux 6.0 & above.
Client Specifications:
 Browser IE 5 & above.
Changes to be done in Metatemplate
You need to make the following changes at Metatemplate level to invoke the feature of Rich Text Editor:
In a site created by you, there are 2 files in Metatemplates directory. They are:
<site_name>/Metatemplates/addTemplate.html  
    <site_name>/Metatemplates/templateJavaScript.html
  In addTemplate.html: To the present content, add the content from the file addTemp at the appropriate location.
  In templateJavaScript.html: To the present content, add the content from the file  tempJS at the appropriate location.
Now the java objects need to be regenerated for the changes to take effect and enable Rich Text Editor functionality in all the templates generated.
Caution : Take a backup, since regeneration of java objects will alter the original Metatemplate structure.
Changes to be done in Templates
You need to effect the following changes at Template level to invoke the feature of Rich Text Editor to that particular template.
In <site_name>/webFiles/templates/auto/add/<x>.html file : To the existing content, add the content from the <template> at the appropriate location.
Freemarker code used in Rich Text Editor Integration :-

$ {} : - This piece of code is used in Meta Template.

For more freemarker tag explanation please refer the Metatemplate document in the website.

Benefits
Rich Text editor helps you in :
  Enhancing the look and feel of the text, as required, in your site.
  Highlighting any text or data which you feel is very important, using the various options available in Rich Text Editor.
The Rich Text Editor is being introduced shortly in zeroCode.