6b7a5ab336bf53b473ff31ce3ba43733f8e629db
[roojs1] / examples / form / htmledit.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11  
12 var mform;
13 var editor;
14 Roo.onReady(function(){
15
16     Roo.QuickTips.init();
17
18  
19     /*
20      * ================  Form 2  =======================
21      */
22     mform = new Roo.form.Form({
23         labelAlign: 'top',
24         items : [
25             {
26                 xtype : 'HtmlEditor',
27                 xns: Roo.form,
28                 white : [ 'iframe' ],
29                 toolbars : [    
30                     {
31                         xtype : 'ToolbarStandard',
32                         xns : Roo.form.HtmlEditor
33                     },
34                       {
35                         xtype : 'ToolbarContext',
36                         xns : Roo.form.HtmlEditor,
37                         styles : {
38                             '*' : [ 'headline' ] ,
39                             'TD' : [ 'underline', 'double-underline' ]
40                         }
41                     },
42                     
43                     
44                 ],
45                 id:'bio',
46                 name : 'bio',
47                 fieldLabel:'Biography',
48                 width:800,
49                 height:400,
50                 resizable: 's' /// where the handles should got..
51
52             },
53             {
54                 xtype : 'Button',
55                 xns: Roo.form,
56                 text: 'Save'
57             },
58             {
59                 xtype : 'Button',
60                 xns: Roo.form,
61                 text: 'Cancel'
62             }
63             
64         ]
65         
66     });
67
68     mform.render('form-ct5');
69     editor = mform.findField('bio');
70 });