Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Search

History

7/11/2006 6:37:19 PM
64.202.160.65
6/7/2005 2:36:48 AM
82.168.11.55
3/11/2005 1:49:06 AM
213.201.135.162
12/17/2004 12:06:44 AM
-61.247.244.96
12/13/2004 4:13:45 AM
-81.202.9.27
List all versions List all versions
Major Free Text Box Java Script Functions
.

Summary : A List of JavaScript functions developers can use to program against FreeTextBox

Major FreeTextBox JavaScript functions

InsertHtml(html)

Inserts HTML at the current cursor position

 FTB_API['FreeTextBox1'].InsertHtml("blah <i>blah</i>");

SurroundHtml(before,after)

Surrounds the currently selected text (and HTML) with the given strings

 FTB_API['FreeTextBox1'].SurroundHtml("<i>before</i>","<u>after</u>");

GetHtml()

Returns the HTML currently in the editor.

 FTB_API['FreeTextBox1'].GetHtml();

SetHtml(html)

Sets the HTML in the editor

 FTB_API['FreeTextBox1'].SetHtml("some new HTML with a table: <table><tr><td>(0, 0)</td><td>(0, 1)</td></tr><tr><td>(1, 0)</td><td>(1, 1)</td></tr></table>");

ExecuteCommand(commandName, middle, commandValue)

Executes commands based on the MSHTML (for IE) and Midas (for Firefox/Mozilla) specifications

 FTB_API['FreeTextBox1'].GetHtml('bold','','');
 FTB_API['FreeTextBox1'].GetHtml('forecolor','','#ffcc00');

QueryCommandValue(commandName)

Querys the state of the current cursor position

 FTB_API['FreeTextBox1'].GetHtml('forecolor');

Focus()

Sets the focus on the current editor

 FTB_API['FreeTextBox1'].Focus();

SetStyle(className)

Sets the classname of current element or surrounds the current text with <span class="className">text</span>

 FTB_API['FreeTextBox1'].SetStyle(className);

clientSideTextChanged(ftb)

In .NET, set the ClientSideTextChanged property or in JavaScript set

 FTB_API['FreeTextBox1'].clientSideTextChanged = myFunction;
 function myFunction(ftb) {
   // do something with FreeTextBox
 }
Welcome to FreeTextBoxWiki

If you're new to FreeTextBox, read the Installation.