-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from helios-ag/tinymce4
Tinymce4
- Loading branch information
Showing
5 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script type="text/javascript"> | ||
function elFinderBrowser (field_name, url, type, win) { | ||
tinymce.activeEditor.windowManager.open({ | ||
file:"{{ url('elfinder') }}", | ||
title: 'elFinder 2.0', | ||
width: 900, | ||
height: 450, | ||
resizable: 'yes' | ||
}, { | ||
setUrl: function (url) { | ||
win.document.getElementById(field_name).value = url; | ||
} | ||
}); | ||
return false; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
{% stylesheets output='assetic/css/compiled/fmelfinder/main.css' | ||
'bundles/fmelfinder/css/*' filter='cssrewrite,?yui_css' %} | ||
<link rel="stylesheet" href="{{ asset_url }}" /> | ||
{% endstylesheets %} | ||
</head> | ||
<body> | ||
{% javascripts output='bundles/fmelfinder/js/main.js' filter='?yui_js' | ||
'@FMElfinderBundle/Resources/public/js/jquery/jquery-1.8.0.min.js' | ||
'@FMElfinderBundle/Resources/public/js/jquery/jquery-ui-1.8.23.custom.min.js' | ||
'@FMElfinderBundle/Resources/public/js/elfinder.min.js' | ||
'@FMElfinderBundle/Resources/public/js/i18n/*' | ||
%} | ||
<script src="{{ asset_url }}"></script> | ||
{% endjavascripts %} | ||
<script type="text/javascript" charset="utf-8"> | ||
var FileBrowserDialogue = { | ||
init: function () { | ||
// Here goes your code for setting your custom things onLoad. | ||
}, | ||
mySubmit: function (URL) { | ||
// pass selected file path to TinyMCE | ||
top.tinymce.activeEditor.windowManager.getParams().setUrl(URL); | ||
// close popup window | ||
top.tinymce.activeEditor.windowManager.close(); | ||
} | ||
} | ||
$(document).ready(function() { | ||
var elf = $('#elfinder').elfinder({ | ||
// set your elFinder options here | ||
url: '{{ path('ef_connect') }}', // connector URL | ||
lang : '{{ locale }}', | ||
getFileCallback: function(file) { // editor callback | ||
FileBrowserDialogue.mySubmit(file.url); // pass selected file path to TinyMCE | ||
} | ||
}).elfinder('instance'); | ||
}); | ||
</script> | ||
<div id="elfinder"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters