diff options
Diffstat (limited to 'httemplate/elements/htmlarea.html')
-rw-r--r-- | httemplate/elements/htmlarea.html | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/httemplate/elements/htmlarea.html b/httemplate/elements/htmlarea.html index f9dcffd3f..c98993d40 100644 --- a/httemplate/elements/htmlarea.html +++ b/httemplate/elements/htmlarea.html @@ -6,6 +6,7 @@ Example: 'field' => 'fieldname', 'curr_value' => $curr_value, 'height' => 800, + 'config' => { extraPlugins => 'blockprotect' }, ); </%doc> @@ -19,21 +20,24 @@ Example: <SCRIPT TYPE="text/javascript"> - CKEDITOR.replace('<% $opt{'field'} %>', { -% if ( $opt{'width'} ) { - width: <% $opt{'width'} %>, -% } - height: <% $opt{'height'} || 420 %>, - startupFocus: true, - toolbarCanCollapse: true, - basePath: '<% $p %>elements/ckeditor/', - enterMode: 2 - }); + CKEDITOR.replace('<% $opt{'field'} %>', + <% encode_json($config) %> + ); </SCRIPT> <%init> my %opt = @_; +my $config = { + 'height' => ($opt{height} || 420), + 'startupFocus' => JSON::true, + 'skin' => 'kama', + 'toolbarCanCollapse' => JSON::true, + 'basePath' => $p.'elements/ckeditor/', + 'enterMode' => 2, + %{ $opt{config} || {} }, +}; +$config->{width} = $opt{width} if defined($opt{width}); </%init> |