diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-09-03 22:52:26 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-09-03 22:52:26 -0700 |
commit | 36ad5e538cb56de33c779e34baf9abdf63c4312e (patch) | |
tree | de42d922496c881b69643656f055b68e64e96d72 /httemplate/elements/htmlarea.html | |
parent | 04c1a98c9bcf2b6f0da8f18b627eec703dbafd49 (diff) | |
parent | aae697565c071b2880d0106b00a4a01d0ddab7bf (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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> |