roojs-all.js
[roojs1] / examples / form / htmledit2.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                 toolbars : [    
29                     {
30                         xtype : 'ToolbarStandard',
31                         xns : Roo.form.HtmlEditor
32                     },
33                       {
34                         xtype : 'ToolbarContext',
35                         xns : Roo.form.HtmlEditor,
36                         styles : {
37                             '*' : [ 'headline' ] ,
38                             'TD' : [ 'underline', 'double-underline' ]
39                         }
40                     },
41                     
42                     
43                 ],
44                
45                 id:'bio',
46                 name : 'bio',
47                 fieldLabel:'Biography',
48                 width:800,
49                 height:400,
50                 stylesheets : [],
51                 resizable: 's' /// where the handles should got..
52
53             },
54             {
55                 xtype : 'Button',
56                 xns: Roo.form,
57                 text: 'Save'
58             },
59             {
60                 xtype : 'Button',
61                 xns: Roo.form,
62                 text: 'Cancel'
63             }
64             
65         ]
66         
67     });
68
69     mform.render('form-ct5');
70     editor = mform.findField('bio');
71 });