summaryrefslogtreecommitdiff
path: root/httemplate/elements/htmlarea.html
blob: f18b941901c9903dea412c8241f67a2e442c8eaf (plain)
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
38
39
40
<%doc>

Example:

  include('/elements/htmlarea.html',
            'field'      => 'fieldname',
            'curr_value' => $curr_value,
            'height'     => 800,
         );

</%doc>

% #init
<SCRIPT TYPE="text/javascript" src="<% $p %>elements/ckeditor/ckeditor.js">
</SCRIPT>

% #editor
<textarea name="<% $opt{'field'} %>"><% $opt{'curr_value'} |h %></textarea>

<SCRIPT TYPE="text/javascript">

  CKEDITOR.replace('<% $opt{'field'} %>', {
%   if ( $opt{'width'} ) {
      width: <% $opt{'width'} %>,
%   }
    height: <% $opt{'height'} || 420 %>,
    startupFocus: true,
    skin: 'kama',
    toolbarCanCollapse: true,
    basePath: '<% $p %>elements/ckeditor/',
    enterMode: 2
  });

</SCRIPT>

<%init>

my %opt = @_;

</%init>