Skip to content

Commit

Permalink
ckeditor relative
Browse files Browse the repository at this point in the history
  • Loading branch information
helios-ag committed Dec 29, 2014
1 parent 4201d7e commit ea65d5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Controller/ElFinderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ private function selectEditor($parameters, $instance, $formTypeId = null)
'locale' => $locale,
'fullscreen' => $fullscreen,
'includeAssets' => $includeAssets,
'instance' => $instance
'instance' => $instance,
'relative_path' => $relativePath
);
return $result;
case 'tinymce':
Expand Down
6 changes: 5 additions & 1 deletion Resources/views/Elfinder/ckeditor.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
lang : '{{locale}}',
getFileCallback : function(file) {
if (funcNum) {
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
{% if relative_path %}
window.opener.CKEDITOR.tools.callFunction(funcNum, file.path);
{% else %}
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
{% endif %}
window.close();
}
}
Expand Down

0 comments on commit ea65d5e

Please sign in to comment.