File: edit_area.phtml

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (37 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
!distribute word $wims_read_parm into edit_area_id, edit_area_syntax, syntax_selection_allow
!if wims_show isin $edit_area_id
  !set is_editable=false
  !set toolbar=""
  !set allow_toggle=true
!endif

!default edit_area_syntax=wimsoef
!default is_editable=true
!default allow_toggle=true
!default toolbar="search, go_to_line, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, highlight, reset_highlight, |, help"
!default syntax_selection_allow=wimsoef,wimsdata,wims,css,html,js,gp,octave,flydraw,wimsdoc,python
!if scripts/js/edit_area/edit_area_full.js notin $wims_html_header
  !set wims_html_header= !append line <script src="scripts/js/edit_area/edit_area_full.js"></script>\
 to $wims_html_header
!endif
!set wims_html_header=!append line <script>\
  // initialisation\
  editAreaLoader.init({\
    id: "$edit_area_id"\
    ,start_highlight: true\
    ,allow_toggle: $allow_toggle\
    ,language: "$lang"\
    ,syntax: "$edit_area_syntax"\
    ,min_width: 150\
    ,min_height:4\
    ,is_editable:$is_editable\
    ,toolbar: $toolbar\
    ,syntax_selection_allow: "$syntax_selection_allow"\
    ,show_line_colors: true\
    ,replace_tab_by_spaces:2\
  }); \
</script>\
to $wims_html_header

!!!TODO add autocompletion: true
!!!,replace_tab_by_spaces:2\