1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.form.HtmlEditor</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.form.HtmlEditor-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.form.HtmlEditor-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.form.HtmlEditor-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.form.HtmlEditor-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner">Ext.form.Field
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.form.HtmlEditor
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.form.HtmlEditor
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.form</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_form_HtmlEditor.js.html">Roo/form/HtmlEditor.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">HtmlEditor</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 Provides a lightweight HTML Editor component.<br/>WARNING - THIS CURRENTlY ONLY WORKS ON FIREFOX - USE FCKeditor for a cross platform version<br/><br/><br><br><b>Note: The focus/blur and validation marking functionality inherited from Ext.form.Field is NOT<br/>supported by this editor.</b><br/><br/><br/>An Editor is a sensitive component that can't be used in all spots standard fields can be used. Putting an Editor within<br/>any element that has display set to 'none' can cause problems in Safari and Firefox.<br/><br/>
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.form.HtmlEditor';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo.form" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.form.HtmlEditor.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.form.HtmlEditor-configs"></a>
113 <table cellspacing="0" class="member-table">
114 <caption>Config Options (Usually are also Properties)</caption>
118 <th class="sig-header" colspan="2">Options</th>
120 <th class="msource-header">Defined By</th>
127 <tr class="config-row expandable config-row-alt0 notInherited">
128 <td class="micon"><a class="exi" href="#expand"> </a></td>
131 <a id="Roo.form.HtmlEditor-cfg-createLinkText" name=".createLinkText"></a>
132 <div class="fixedFont">
133 <b class="itemname">createLinkText</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
139 <div class="short">The default text for the create link prompt</div>
143 <div class="long">The default text for the create link prompt</div>
157 <tr class="config-row expandable config-row-alt1 notInherited">
158 <td class="micon"><a class="exi" href="#expand"> </a></td>
161 <a id="Roo.form.HtmlEditor-cfg-defaultLinkValue" name=".defaultLinkValue"></a>
162 <div class="fixedFont">
163 <b class="itemname">defaultLinkValue</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
169 <div class="short">The default value for the create link prompt (defaults to http:/ /)</div>
173 <div class="long">The default value for the create link prompt (defaults to http:/ /)</div>
187 <tr class="config-row expandable config-row-alt0 notInherited">
188 <td class="micon"><a class="exi" href="#expand"> </a></td>
191 <a id="Roo.form.HtmlEditor-cfg-height" name=".height"></a>
192 <div class="fixedFont">
193 <b class="itemname">height</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
199 <div class="short">(in pixels)</div>
203 <div class="long">(in pixels)</div>
217 <tr class="config-row expandable config-row-alt1 notInherited">
218 <td class="micon"><a class="exi" href="#expand"> </a></td>
221 <a id="Roo.form.HtmlEditor-cfg-resizable" name=".resizable"></a>
222 <div class="fixedFont">
223 <b class="itemname">resizable</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
229 <div class="short">'s' or 'se' or 'e' - wrapps the element in a<br/> Roo.resizable.</div>
233 <div class="long">'s' or 'se' or 'e' - wrapps the element in a<br/> Roo.resizable.</div>
247 <tr class="config-row expandable config-row-alt0 notInherited">
248 <td class="micon"><a class="exi" href="#expand"> </a></td>
251 <a id="Roo.form.HtmlEditor-cfg-toolbars" name=".toolbars"></a>
252 <div class="fixedFont">
253 <b class="itemname">toolbars</b> : <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
259 <div class="short">Array of toolbars.</div>
263 <div class="long">Array of toolbars. - defaults to just the Standard one</div>
277 <tr class="config-row expandable config-row-alt1 notInherited">
278 <td class="micon"><a class="exi" href="#expand"> </a></td>
281 <a id="Roo.form.HtmlEditor-cfg-width" name=".width"></a>
282 <div class="fixedFont">
283 <b class="itemname">width</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
289 <div class="short">(in pixels)</div>
293 <div class="long">(in pixels)</div>
317 <!-- ============================== public properties ==================== -->
321 <a id="Roo.form.HtmlEditor-props"></a>
327 <table cellspacing="0" class="member-table">
328 <caption class="Empty">Public Properties - Has None</caption>
334 <!-- ============================== methods summary / details ======================== -->
337 <a id="Roo.form.HtmlEditor-methods"></a>
338 <!-- constructor?? -->
345 <!-- then dynamics first -->
352 <table cellspacing="0" class="member-table">
353 <caption>Public Methods</caption>
355 <th class="sig-header" colspan="2">Method</th>
356 <th class="msource-header">Defined By</th>
366 <tr class="method-row config-row-alt0 notInherited">
367 <td class="micon"><a class="exi" href="#expand"> </a></td>
371 <a id="Roo.form-method-HtmlEditor" name=".HtmlEditor"></a>
372 <div class="fixedFont">
373 <span class="attributes">new <B>Roo.form.</B></span><b class="itemname">HtmlEditor</b>
383 <div class="short">Create a new Roo.form.HtmlEditor</div>
390 Create a new Roo.form.HtmlEditor
413 <tr class="method-row config-row-alt1 expandable notInherited">
414 <td class="micon"><a class="exi" href="#expand"> </a></td>
418 <a id="Roo.form.HtmlEditor-method-cleanHtml" name=".cleanHtml"></a>
419 <div class="fixedFont">
420 <span class="attributes"></span><b class="itemname">cleanHtml</b>
422 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
429 <div class="short">Protected method that will not generally be called directly.</div>
435 Protected method that will not generally be called directly. If you need/want<br/>custom HTML cleanup, this is the method you should override.
442 <dl class="detailList">
443 <dt class="heading">Parameters:</dt>
446 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
449 <dd>The HTML to be cleaned<br/>return {String} The cleaned HTML</dd>
475 <tr class="method-row config-row-alt0 expandable notInherited">
476 <td class="micon"><a class="exi" href="#expand"> </a></td>
480 <a id="Roo.form.HtmlEditor-method-createToolbar" name=".createToolbar"></a>
481 <div class="fixedFont">
482 <span class="attributes"></span><b class="itemname">createToolbar</b>
484 (HtmlEditor <B><i>editor</i></B>)
491 <div class="short">Protected method that will not generally be called directly.</div>
497 Protected method that will not generally be called directly. It<br/>is called when the editor creates its toolbar. Override this method if you need to<br/>add custom toolbar buttons.
504 <dl class="detailList">
505 <dt class="heading">Parameters:</dt>
508 <span class="fixedFont">HtmlEditor</span> <b>editor</b>
537 <tr class="method-row config-row-alt1 expandable notInherited">
538 <td class="micon"><a class="exi" href="#expand"> </a></td>
542 <a id="Roo.form.HtmlEditor-method-execCmd" name=".execCmd"></a>
543 <div class="fixedFont">
544 <span class="attributes"></span><b class="itemname">execCmd</b>
546 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>cmd</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean <B><i>value</i></B>)
553 <div class="short">Executes a Midas editor command directly on the editor document.</div>
559 Executes a Midas editor command directly on the editor document.<br/>For visual commands, you should use {<b>link</b> <b>relayCmd</b>} instead.<br/><b>This should only be called after the editor is initialized.</b>
566 <dl class="detailList">
567 <dt class="heading">Parameters:</dt>
570 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>cmd</b>
573 <dd>The Midas command</dd>
576 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean</span> <b>value</b>
579 <dd>(optional) The value to pass to the command (defaults to null)</dd>
605 <tr class="method-row config-row-alt0 expandable notInherited">
606 <td class="micon"><a class="exi" href="#expand"> </a></td>
610 <a id="Roo.form.HtmlEditor-method-getDocMarkup" name=".getDocMarkup"></a>
611 <div class="fixedFont">
612 <span class="attributes"></span><b class="itemname">getDocMarkup</b>
621 <div class="short">Protected method that will not generally be called directly.</div>
627 Protected method that will not generally be called directly. It<br/>is called when the editor initializes the iframe with HTML contents. Override this method if you<br/>want to change the initialization markup of the iframe (e.g. to add stylesheets).
656 <tr class="method-row config-row-alt1 expandable notInherited">
657 <td class="micon"><a class="exi" href="#expand"> </a></td>
661 <a id="Roo.form.HtmlEditor-method-insertAtCursor" name=".insertAtCursor"></a>
662 <div class="fixedFont">
663 <span class="attributes"></span><b class="itemname">insertAtCursor</b>
665 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>text</i></B>)
672 <div class="short">Inserts the passed text at the current cursor position.</div>
678 Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated<br/>to insert tRoo.
685 <dl class="detailList">
686 <dt class="heading">Parameters:</dt>
689 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>text</b>
718 <tr class="method-row config-row-alt0 expandable notInherited">
719 <td class="micon"><a class="exi" href="#expand"> </a></td>
723 <a id="Roo.form.HtmlEditor-method-pushValue" name=".pushValue"></a>
724 <div class="fixedFont">
725 <span class="attributes"></span><b class="itemname">pushValue</b>
734 <div class="short">Protected method that will not generally be called directly.</div>
740 Protected method that will not generally be called directly. Pushes the value of the textarea<br/>into the iframe editor.
769 <tr class="method-row config-row-alt1 expandable notInherited">
770 <td class="micon"><a class="exi" href="#expand"> </a></td>
774 <a id="Roo.form.HtmlEditor-method-relayCmd" name=".relayCmd"></a>
775 <div class="fixedFont">
776 <span class="attributes"></span><b class="itemname">relayCmd</b>
778 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>cmd</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean <B><i>value</i></B>)
785 <div class="short">Executes a Midas editor command on the editor document and performs necessary focus and<br/>toolbar updates.</div>
791 Executes a Midas editor command on the editor document and performs necessary focus and<br/>toolbar updates. <b>This should only be called after the editor is initialized.</b>
798 <dl class="detailList">
799 <dt class="heading">Parameters:</dt>
802 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>cmd</b>
805 <dd>The Midas command</dd>
808 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean</span> <b>value</b>
811 <dd>(optional) The value to pass to the command (defaults to null)</dd>
837 <tr class="method-row config-row-alt0 expandable notInherited">
838 <td class="micon"><a class="exi" href="#expand"> </a></td>
842 <a id="Roo.form.HtmlEditor-method-syncValue" name=".syncValue"></a>
843 <div class="fixedFont">
844 <span class="attributes"></span><b class="itemname">syncValue</b>
853 <div class="short">Protected method that will not generally be called directly.</div>
859 Protected method that will not generally be called directly. Syncs the contents<br/>of the editor iframe with the textarea.
888 <tr class="method-row config-row-alt1 expandable notInherited">
889 <td class="micon"><a class="exi" href="#expand"> </a></td>
893 <a id="Roo.form.HtmlEditor-method-toggleSourceEdit" name=".toggleSourceEdit"></a>
894 <div class="fixedFont">
895 <span class="attributes"></span><b class="itemname">toggleSourceEdit</b>
897 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>sourceEdit</i></B>)
904 <div class="short">Toggles the editor between standard and source edit mode.</div>
910 Toggles the editor between standard and source edit mode.
917 <dl class="detailList">
918 <dt class="heading">Parameters:</dt>
921 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>sourceEdit</b>
924 <dd>(optional) True for source edit, false for standard</dd>
953 <!-- ============================== events summary / details ======================== -->
956 <a id="Roo.form.HtmlEditor-events"></a>
965 <table cellspacing="0" class="member-table">
966 <caption>Events</caption>
969 <th class="sig-header" colspan="2">Event</th>
970 <th class="msource-header">Defined By</th>
979 <tr class="method-row expandable config-row-alt0 notInherited">
980 <td class="micon"><a class="exi" href="#expand"> </a></td>
983 <a id="Roo.form.HtmlEditor-event-*activate"></a>
985 <div class="fixedFont">
986 <b class="itemname">activate</b> (HtmlEditor <B><i>this</i></B>)
992 <div class="short">Fires when the editor is first receives the focus.
998 Fires when the editor is first receives the focus. Any insertion must wait<br/>until after this event.
1004 <dl class="detailList">
1005 <dt class="heading">Parameters:</dt>
1008 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1029 <td class="msource">
1034 <tr class="method-row expandable config-row-alt1 notInherited">
1035 <td class="micon"><a class="exi" href="#expand"> </a></td>
1038 <a id="Roo.form.HtmlEditor-event-*beforepush"></a>
1040 <div class="fixedFont">
1041 <b class="itemname">beforepush</b> (HtmlEditor <B><i>this</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
1047 <div class="short">Fires before the iframe editor is updated with content from the textarea.
1053 Fires before the iframe editor is updated with content from the textarea. Return false<br/>to cancel the push.
1059 <dl class="detailList">
1060 <dt class="heading">Parameters:</dt>
1063 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1069 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1090 <td class="msource">
1095 <tr class="method-row expandable config-row-alt0 notInherited">
1096 <td class="micon"><a class="exi" href="#expand"> </a></td>
1099 <a id="Roo.form.HtmlEditor-event-*beforesync"></a>
1101 <div class="fixedFont">
1102 <b class="itemname">beforesync</b> (HtmlEditor <B><i>this</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
1108 <div class="short">Fires before the textarea is updated with content from the editor iframe.
1114 Fires before the textarea is updated with content from the editor iframe. Return false<br/>to cancel the sync.
1120 <dl class="detailList">
1121 <dt class="heading">Parameters:</dt>
1124 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1130 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1151 <td class="msource">
1156 <tr class="method-row expandable config-row-alt1 notInherited">
1157 <td class="micon"><a class="exi" href="#expand"> </a></td>
1160 <a id="Roo.form.HtmlEditor-event-*editmodechange"></a>
1162 <div class="fixedFont">
1163 <b class="itemname">editmodechange</b> (HtmlEditor <B><i>this</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>sourceEdit</i></B>)
1169 <div class="short">Fires when the editor switches edit modes
1175 Fires when the editor switches edit modes
1181 <dl class="detailList">
1182 <dt class="heading">Parameters:</dt>
1185 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1191 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>sourceEdit</b>
1194 <dd>True if source edit, false if standard editing.</dd>
1212 <td class="msource">
1217 <tr class="method-row expandable config-row-alt0 notInherited">
1218 <td class="micon"><a class="exi" href="#expand"> </a></td>
1221 <a id="Roo.form.HtmlEditor-event-*editorevent"></a>
1223 <div class="fixedFont">
1224 <b class="itemname">editorevent</b> (HtmlEditor <B><i>this</i></B>)
1230 <div class="short">Fires when on any editor (mouse up/down cursor movement etc.
1236 Fires when on any editor (mouse up/down cursor movement etc.) - used for toolbar hooks.
1242 <dl class="detailList">
1243 <dt class="heading">Parameters:</dt>
1246 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1267 <td class="msource">
1272 <tr class="method-row expandable config-row-alt1 notInherited">
1273 <td class="micon"><a class="exi" href="#expand"> </a></td>
1276 <a id="Roo.form.HtmlEditor-event-*initialize"></a>
1278 <div class="fixedFont">
1279 <b class="itemname">initialize</b> (HtmlEditor <B><i>this</i></B>)
1285 <div class="short">Fires when the editor is fully initialized (including the iframe)
1291 Fires when the editor is fully initialized (including the iframe)
1297 <dl class="detailList">
1298 <dt class="heading">Parameters:</dt>
1301 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1322 <td class="msource">
1327 <tr class="method-row expandable config-row-alt0 notInherited">
1328 <td class="micon"><a class="exi" href="#expand"> </a></td>
1331 <a id="Roo.form.HtmlEditor-event-*push"></a>
1333 <div class="fixedFont">
1334 <b class="itemname">push</b> (HtmlEditor <B><i>this</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
1340 <div class="short">Fires when the iframe editor is updated with content from the textarea.
1346 Fires when the iframe editor is updated with content from the textarea.
1352 <dl class="detailList">
1353 <dt class="heading">Parameters:</dt>
1356 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1362 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1383 <td class="msource">
1388 <tr class="method-row expandable config-row-alt1 notInherited">
1389 <td class="micon"><a class="exi" href="#expand"> </a></td>
1392 <a id="Roo.form.HtmlEditor-event-*sync"></a>
1394 <div class="fixedFont">
1395 <b class="itemname">sync</b> (HtmlEditor <B><i>this</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
1401 <div class="short">Fires when the textarea is updated with content from the editor iframe.
1407 Fires when the textarea is updated with content from the editor iframe.
1413 <dl class="detailList">
1414 <dt class="heading">Parameters:</dt>
1417 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1423 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1444 <td class="msource">
1456 <!-- ============================== footer ================================= -->
1457 <div class="fineprint" style="clear:both">
1459 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Mon Aug 15 2011 16:40:29 GMT+0800 (HKT)
1461 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>