summaryrefslogtreecommitdiff
path: root/httemplate/elements/htmlarea.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-08-29 16:23:27 -0700
committerMark Wells <mark@freeside.biz>2013-08-29 16:23:27 -0700
commit35d24c449337f95d0e2174cbed55b53eb6c32ca2 (patch)
treecb3688ae89f3b26fe549008a88c01b3e22c28308 /httemplate/elements/htmlarea.html
parentf829595fdd9e62b91251fc1cc2726367e558e1d4 (diff)
when editing templates with CKEditor, protect blocks of perl code, #24331
Diffstat (limited to 'httemplate/elements/htmlarea.html')
-rw-r--r--httemplate/elements/htmlarea.html24
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>