@@ -50,12 +50,11 @@ function exec_cell(c_id) {
5050 let output = ( "global" , eval ) ( vars_in_scope [ id ] . getValue ( ) )
5151 if ( Array . isArray ( output ) ) {
5252 output = print_val ( output )
53- } else if ( typeof output == 'object' && output !== null ) {
53+ }
54+ else if ( typeof output === 'object' && output !== null ) {
5455 output = JSON . stringify ( output )
55- if ( output == "{}" ) {
56- output = ""
57- }
58- } else if ( console ) {
56+ }
57+ else if ( console ) {
5958 //retreive value from the console funcction
6059 console . oldLog = console . log ;
6160 console . log = function ( value ) {
@@ -157,16 +156,13 @@ function add_new_code_cell(c_id, where) {
157156
158157 let editor = CodeMirror ( document . getElementById ( `div-${ new_id } ` ) , {
159158 lineNumbers : true ,
160- tabSize : 4 ,
159+ tabSize : 2 ,
161160 mode : 'javascript' ,
162161 theme : 'monokai' ,
163- value : '' ,
164- extraKeys : { "Ctrl-Space" : "autocomplete" } ,
165- autoCloseBrackets : true
162+ value : ''
166163 } ) ;
167164 vars_in_scope [ `div-${ new_id } ` ] = editor
168165
169- //show action buttons on hover
170166 $ ( `#div-${ new_id } ` )
171167 . mouseover ( function ( ) {
172168 $ ( `#btn-actions-${ new_id } ` ) . show ( )
@@ -267,6 +263,7 @@ function add_new_text_cell(c_id, where) {
267263 document . getElementById ( `btn-actions-${ new_id } ` ) . style . display = "none"
268264 } ) ;
269265
266+
270267}
271268
272269function delete_cell ( id ) {
@@ -295,7 +292,6 @@ $(document).on("click", "button.run", function () {
295292 }
296293} )
297294
298-
299295$ ( document ) . on ( "click" , "button.del" , function ( ) {
300296 let id = this . id . split ( "_" ) [ 1 ]
301297 console . log ( id , this . id , __code_cell_count )
@@ -338,7 +334,6 @@ function show_md(id, value) {
338334 document . getElementById ( div_id ) . style . display = "none"
339335}
340336
341-
342337$ ( document ) . on ( "dblclick" , "div.text-out-box" , function ( ) {
343338 let id = this . id . split ( "_" ) [ 1 ]
344339 md_id = `text-div_${ id } `
0 commit comments