f18b941901c9903dea412c8241f67a2e442c8eaf
[freeside.git] / httemplate / elements / htmlarea.html
1 <%doc>
2
3 Example:
4
5   include('/elements/htmlarea.html',
6             'field'      => 'fieldname',
7             'curr_value' => $curr_value,
8             'height'     => 800,
9          );
10
11 </%doc>
12
13 % #init
14 <SCRIPT TYPE="text/javascript" src="<% $p %>elements/ckeditor/ckeditor.js">
15 </SCRIPT>
16
17 % #editor
18 <textarea name="<% $opt{'field'} %>"><% $opt{'curr_value'} |h %></textarea>
19
20 <SCRIPT TYPE="text/javascript">
21
22   CKEDITOR.replace('<% $opt{'field'} %>', {
23 %   if ( $opt{'width'} ) {
24       width: <% $opt{'width'} %>,
25 %   }
26     height: <% $opt{'height'} || 420 %>,
27     startupFocus: true,
28     skin: 'kama',
29     toolbarCanCollapse: true,
30     basePath: '<% $p %>elements/ckeditor/',
31     enterMode: 2
32   });
33
34 </SCRIPT>
35
36 <%init>
37
38 my %opt = @_;
39
40 </%init>