Subversion Repositories wimsdev

Rev

Rev 12706 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !distribute word $wims_read_parm into edit_area_id, edit_area_syntax, syntax_selection_allow
  2. !if wims_show isin $edit_area_id
  3.   !set is_editable=false
  4.   !set toolbar=""
  5.   !set allow_toggle=true
  6. !endif
  7.  
  8. !default edit_area_syntax=wimsoef
  9. !default is_editable=true
  10. !default allow_toggle=true
  11. !default toolbar="search, go_to_line, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, highlight, reset_highlight, |, help"
  12. !default syntax_selection_allow=wimsoef,wimsdata,wims,css,html,js,gp,octave,flydraw,wimsdoc,python
  13. !if scripts/js/edit_area/edit_area_full.js notin $wims_html_header
  14.   !set wims_html_header= !append line <script src="scripts/js/edit_area/edit_area_full.js"></script>\
  15.  to $wims_html_header
  16. !endif
  17. !set wims_html_header=!append line <script>\
  18.   // initialisation\
  19.   editAreaLoader.init({\
  20.     id: "$edit_area_id"\
  21.     ,start_highlight: true\
  22.     ,allow_toggle: $allow_toggle\
  23.     ,language: "$lang"\
  24.     ,syntax: "$edit_area_syntax"\
  25.     ,min_width: 150\
  26.     ,min_height:4\
  27.     ,is_editable:$is_editable\
  28.     ,toolbar: $toolbar\
  29.     ,syntax_selection_allow: "$syntax_selection_allow"\
  30.     ,show_line_colors: true\
  31.     ,replace_tab_by_spaces:2\
  32.   }); \
  33. </script>\
  34. to $wims_html_header
  35.  
  36. !!!TODO add autocompletion: true
  37. !!!,replace_tab_by_spaces:2\
  38.