File tree Expand file tree Collapse file tree
src/WebAppDIRAC/WebApp/static/DIRAC/Notepad/classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66Ext . define ( "DIRAC.Notepad.classes.Notepad" , {
77 extend : "Ext.dirac.core.Module" ,
88
9- requires : [ "Ext.form.field.HtmlEditor " ] ,
9+ requires : [ "Ext.form.field.TextArea " ] ,
1010
1111 initComponent : function ( ) {
1212 var me = this ;
@@ -16,8 +16,11 @@ Ext.define("DIRAC.Notepad.classes.Notepad", {
1616 me . launcher . width = 400 ;
1717 me . launcher . height = 400 ;
1818
19- me . editor = new Ext . form . field . HtmlEditor ( {
20- value : [ 'Some <b>rich</b> <font color="red">text</font> goes <u>here</u><br>' , "Give it a try!" ] . join ( "" ) ,
19+ me . editor = new Ext . form . field . TextArea ( {
20+ value : [ "Some text goes here." , "Give it a try!" ] . join ( "\n" ) ,
21+ grow : true ,
22+ growMin : 200 ,
23+ enableKeyEvents : true ,
2124 } ) ;
2225
2326 Ext . apply ( me , {
@@ -32,10 +35,10 @@ Ext.define("DIRAC.Notepad.classes.Notepad", {
3235 var me = this ;
3336
3437 if ( "helptext" in data ) {
35- me . editor . setValue ( data [ "helptext" ] ) ;
38+ me . editor . setValue ( String ( data [ "helptext" ] || "" ) ) ;
3639 }
3740 if ( "text" in data ) {
38- me . editor . setValue ( data [ "text" ] ) ;
41+ me . editor . setValue ( String ( data [ "text" ] || "" ) ) ;
3942 }
4043 } ,
4144
You can’t perform that action at this time.
0 commit comments