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-toolbars" name=".toolbars"></a>
192 <div class="fixedFont">
193 <b class="itemname">toolbars</b> : <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
199 <div class="short">Array of toolbars.</div>
203 <div class="long">Array of toolbars. - defaults to just the Standard one</div>
227 <!-- ============================== public properties ==================== -->
231 <a id="Roo.form.HtmlEditor-props"></a>
237 <table cellspacing="0" class="member-table">
238 <caption class="Empty">Public Properties - Has None</caption>
244 <!-- ============================== methods summary / details ======================== -->
247 <a id="Roo.form.HtmlEditor-methods"></a>
248 <!-- constructor?? -->
255 <!-- then dynamics first -->
262 <table cellspacing="0" class="member-table">
263 <caption>Public Methods</caption>
265 <th class="sig-header" colspan="2">Method</th>
266 <th class="msource-header">Defined By</th>
276 <tr class="method-row config-row-alt0 notInherited">
277 <td class="micon"><a class="exi" href="#expand"> </a></td>
281 <a id="Roo.form-method-HtmlEditor" name=".HtmlEditor"></a>
282 <div class="fixedFont">
283 <span class="attributes">new <B>Roo.form.</B></span><b class="itemname">HtmlEditor</b>
293 <div class="short">Create a new Roo.form.HtmlEditor</div>
300 Create a new Roo.form.HtmlEditor
323 <tr class="method-row config-row-alt1 expandable notInherited">
324 <td class="micon"><a class="exi" href="#expand"> </a></td>
328 <a id="Roo.form.HtmlEditor-method-cleanHtml" name=".cleanHtml"></a>
329 <div class="fixedFont">
330 <span class="attributes"></span><b class="itemname">cleanHtml</b>
332 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>html</i></B>)
339 <div class="short">Protected method that will not generally be called directly.</div>
345 Protected method that will not generally be called directly. If you need/want<br/>custom HTML cleanup, this is the method you should override.
352 <dl class="detailList">
353 <dt class="heading">Parameters:</dt>
356 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
359 <dd>The HTML to be cleaned<br/>return {String} The cleaned HTML</dd>
385 <tr class="method-row config-row-alt0 expandable notInherited">
386 <td class="micon"><a class="exi" href="#expand"> </a></td>
390 <a id="Roo.form.HtmlEditor-method-createToolbar" name=".createToolbar"></a>
391 <div class="fixedFont">
392 <span class="attributes"></span><b class="itemname">createToolbar</b>
394 (HtmlEditor <B><i>editor</i></B>)
401 <div class="short">Protected method that will not generally be called directly.</div>
407 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.
414 <dl class="detailList">
415 <dt class="heading">Parameters:</dt>
418 <span class="fixedFont">HtmlEditor</span> <b>editor</b>
447 <tr class="method-row config-row-alt1 expandable notInherited">
448 <td class="micon"><a class="exi" href="#expand"> </a></td>
452 <a id="Roo.form.HtmlEditor-method-execCmd" name=".execCmd"></a>
453 <div class="fixedFont">
454 <span class="attributes"></span><b class="itemname">execCmd</b>
456 (<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>)
463 <div class="short">Executes a Midas editor command directly on the editor document.</div>
469 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>
476 <dl class="detailList">
477 <dt class="heading">Parameters:</dt>
480 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>cmd</b>
483 <dd>The Midas command</dd>
486 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean</span> <b>value</b>
489 <dd>(optional) The value to pass to the command (defaults to null)</dd>
515 <tr class="method-row config-row-alt0 expandable notInherited">
516 <td class="micon"><a class="exi" href="#expand"> </a></td>
520 <a id="Roo.form.HtmlEditor-method-getDocMarkup" name=".getDocMarkup"></a>
521 <div class="fixedFont">
522 <span class="attributes"></span><b class="itemname">getDocMarkup</b>
531 <div class="short">Protected method that will not generally be called directly.</div>
537 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).
566 <tr class="method-row config-row-alt1 expandable notInherited">
567 <td class="micon"><a class="exi" href="#expand"> </a></td>
571 <a id="Roo.form.HtmlEditor-method-insertAtCursor" name=".insertAtCursor"></a>
572 <div class="fixedFont">
573 <span class="attributes"></span><b class="itemname">insertAtCursor</b>
575 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>text</i></B>)
582 <div class="short">Inserts the passed text at the current cursor position.</div>
588 Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated<br/>to insert tRoo.
595 <dl class="detailList">
596 <dt class="heading">Parameters:</dt>
599 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>text</b>
628 <tr class="method-row config-row-alt0 expandable notInherited">
629 <td class="micon"><a class="exi" href="#expand"> </a></td>
633 <a id="Roo.form.HtmlEditor-method-pushValue" name=".pushValue"></a>
634 <div class="fixedFont">
635 <span class="attributes"></span><b class="itemname">pushValue</b>
644 <div class="short">Protected method that will not generally be called directly.</div>
650 Protected method that will not generally be called directly. Pushes the value of the textarea<br/>into the iframe editor.
679 <tr class="method-row config-row-alt1 expandable notInherited">
680 <td class="micon"><a class="exi" href="#expand"> </a></td>
684 <a id="Roo.form.HtmlEditor-method-relayCmd" name=".relayCmd"></a>
685 <div class="fixedFont">
686 <span class="attributes"></span><b class="itemname">relayCmd</b>
688 (<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>)
695 <div class="short">Executes a Midas editor command on the editor document and performs necessary focus and<br/>toolbar updates.</div>
701 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>
708 <dl class="detailList">
709 <dt class="heading">Parameters:</dt>
712 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>cmd</b>
715 <dd>The Midas command</dd>
718 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Boolean</span> <b>value</b>
721 <dd>(optional) The value to pass to the command (defaults to null)</dd>
747 <tr class="method-row config-row-alt0 expandable notInherited">
748 <td class="micon"><a class="exi" href="#expand"> </a></td>
752 <a id="Roo.form.HtmlEditor-method-syncValue" name=".syncValue"></a>
753 <div class="fixedFont">
754 <span class="attributes"></span><b class="itemname">syncValue</b>
763 <div class="short">Protected method that will not generally be called directly.</div>
769 Protected method that will not generally be called directly. Syncs the contents<br/>of the editor iframe with the textarea.
798 <tr class="method-row config-row-alt1 expandable notInherited">
799 <td class="micon"><a class="exi" href="#expand"> </a></td>
803 <a id="Roo.form.HtmlEditor-method-toggleSourceEdit" name=".toggleSourceEdit"></a>
804 <div class="fixedFont">
805 <span class="attributes"></span><b class="itemname">toggleSourceEdit</b>
807 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>sourceEdit</i></B>)
814 <div class="short">Toggles the editor between standard and source edit mode.</div>
820 Toggles the editor between standard and source edit mode.
827 <dl class="detailList">
828 <dt class="heading">Parameters:</dt>
831 <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>
834 <dd>(optional) True for source edit, false for standard</dd>
863 <!-- ============================== events summary / details ======================== -->
866 <a id="Roo.form.HtmlEditor-events"></a>
875 <table cellspacing="0" class="member-table">
876 <caption>Events</caption>
879 <th class="sig-header" colspan="2">Event</th>
880 <th class="msource-header">Defined By</th>
889 <tr class="method-row expandable config-row-alt0 notInherited">
890 <td class="micon"><a class="exi" href="#expand"> </a></td>
893 <a id="Roo.form.HtmlEditor-event-*activate"></a>
895 <div class="fixedFont">
896 <b class="itemname">activate</b> (HtmlEditor <B><i>this</i></B>)
902 <div class="short">Fires when the editor is first receives the focus.
908 Fires when the editor is first receives the focus. Any insertion must wait<br/>until after this event.
914 <dl class="detailList">
915 <dt class="heading">Parameters:</dt>
918 <span class="fixedFont">HtmlEditor</span> <b>this</b>
944 <tr class="method-row expandable config-row-alt1 notInherited">
945 <td class="micon"><a class="exi" href="#expand"> </a></td>
948 <a id="Roo.form.HtmlEditor-event-*beforepush"></a>
950 <div class="fixedFont">
951 <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>)
957 <div class="short">Fires before the iframe editor is updated with content from the textarea.
963 Fires before the iframe editor is updated with content from the textarea. Return false<br/>to cancel the push.
969 <dl class="detailList">
970 <dt class="heading">Parameters:</dt>
973 <span class="fixedFont">HtmlEditor</span> <b>this</b>
979 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1000 <td class="msource">
1005 <tr class="method-row expandable config-row-alt0 notInherited">
1006 <td class="micon"><a class="exi" href="#expand"> </a></td>
1009 <a id="Roo.form.HtmlEditor-event-*beforesync"></a>
1011 <div class="fixedFont">
1012 <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>)
1018 <div class="short">Fires before the textarea is updated with content from the editor iframe.
1024 Fires before the textarea is updated with content from the editor iframe. Return false<br/>to cancel the sync.
1030 <dl class="detailList">
1031 <dt class="heading">Parameters:</dt>
1034 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1040 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1061 <td class="msource">
1066 <tr class="method-row expandable config-row-alt1 notInherited">
1067 <td class="micon"><a class="exi" href="#expand"> </a></td>
1070 <a id="Roo.form.HtmlEditor-event-*editmodechange"></a>
1072 <div class="fixedFont">
1073 <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>)
1079 <div class="short">Fires when the editor switches edit modes
1085 Fires when the editor switches edit modes
1091 <dl class="detailList">
1092 <dt class="heading">Parameters:</dt>
1095 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1101 <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>
1104 <dd>True if source edit, false if standard editing.</dd>
1122 <td class="msource">
1127 <tr class="method-row expandable config-row-alt0 notInherited">
1128 <td class="micon"><a class="exi" href="#expand"> </a></td>
1131 <a id="Roo.form.HtmlEditor-event-*editorevent"></a>
1133 <div class="fixedFont">
1134 <b class="itemname">editorevent</b> (HtmlEditor <B><i>this</i></B>)
1140 <div class="short">Fires when on any editor (mouse up/down cursor movement etc.
1146 Fires when on any editor (mouse up/down cursor movement etc.) - used for toolbar hooks.
1152 <dl class="detailList">
1153 <dt class="heading">Parameters:</dt>
1156 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1177 <td class="msource">
1182 <tr class="method-row expandable config-row-alt1 notInherited">
1183 <td class="micon"><a class="exi" href="#expand"> </a></td>
1186 <a id="Roo.form.HtmlEditor-event-*initialize"></a>
1188 <div class="fixedFont">
1189 <b class="itemname">initialize</b> (HtmlEditor <B><i>this</i></B>)
1195 <div class="short">Fires when the editor is fully initialized (including the iframe)
1201 Fires when the editor is fully initialized (including the iframe)
1207 <dl class="detailList">
1208 <dt class="heading">Parameters:</dt>
1211 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1232 <td class="msource">
1237 <tr class="method-row expandable config-row-alt0 notInherited">
1238 <td class="micon"><a class="exi" href="#expand"> </a></td>
1241 <a id="Roo.form.HtmlEditor-event-*push"></a>
1243 <div class="fixedFont">
1244 <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>)
1250 <div class="short">Fires when the iframe editor is updated with content from the textarea.
1256 Fires when the iframe editor is updated with content from the textarea.
1262 <dl class="detailList">
1263 <dt class="heading">Parameters:</dt>
1266 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1272 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1293 <td class="msource">
1298 <tr class="method-row expandable config-row-alt1 notInherited">
1299 <td class="micon"><a class="exi" href="#expand"> </a></td>
1302 <a id="Roo.form.HtmlEditor-event-*sync"></a>
1304 <div class="fixedFont">
1305 <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>)
1311 <div class="short">Fires when the textarea is updated with content from the editor iframe.
1317 Fires when the textarea is updated with content from the editor iframe.
1323 <dl class="detailList">
1324 <dt class="heading">Parameters:</dt>
1327 <span class="fixedFont">HtmlEditor</span> <b>this</b>
1333 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>html</b>
1354 <td class="msource">
1366 <!-- ============================== footer ================================= -->
1367 <div class="fineprint" style="clear:both">
1369 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Tue Jul 27 2010 11:08:33 GMT+0800 (HKT)
1371 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>