</%doc>
% #init
-<SCRIPT TYPE="text/javascript" src="<% $p %>elements/ckeditor/ckeditor.js">
+<SCRIPT TYPE="text/javascript" src="<% $fsurl %>elements/ckeditor/ckeditor.js">
</SCRIPT>
% #editor
<SCRIPT TYPE="text/javascript">
- CKEDITOR.replace('<% $opt{'field'} %>',
+ var <% $opt{'field'} %>_editor =
+ CKEDITOR.replace('<% $opt{'field'} %>',
<% encode_json($config) %>
);
my %opt = @_;
my $config = {
'height' => ($opt{height} || 420),
- 'startupFocus' => JSON::true,
+ 'startupFocus' => Cpanel::JSON::XS::true,
'skin' => 'kama',
'toolbarCanCollapse' => JSON::true,
'removePlugins' => 'elementspath',
- 'basePath' => $p.'elements/ckeditor/',
+ 'basePath' => $fsurl.'elements/ckeditor/',
'enterMode' => 2,
%{ $opt{config} || {} },
};