f9dcffd3f6be3874b4fce2f9e1d33672872a2ee6
[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     toolbarCanCollapse: true,
29     basePath: '<% $p %>elements/ckeditor/',
30     enterMode: 2
31   });
32
33 </SCRIPT>
34
35 <%init>
36
37 my %opt = @_;
38
39 </%init>