Quivive File-Manager

Germany Great Britain (UK)
 
Manual
Shop
Service
PayPal
News Blog

Google+

Demo for tinymce 4.x

Here you find a little example for embedding Quivive File-Manager plugin into CKEditor. The appropriate source code is includet...

 

Only a few lines of code and you can use Quivive File-Manager plugin as an alternative file browser.

Example script for Tinymce:

<!-- Quivive File-Manager -->
<form>
<textarea id="place" name="place" rows="4" cols="30" style="width:100%;height:350px">
The quick brown fox jumps over the lazy dog.
</textarea>
</form>

<script type="text/javascript" src="tinymce/tinymce.min.js"></script>

<script type="text/javascript">
tinymce.init({
selector: "textarea",
auto_focus : true,
resize : false,
convert_urls: false,
plugins: ['advlist autolink lists link image charmap print preview hr anchor pagebreak searchreplace visualblocks visualchars media nonbreaking table contextmenu template paste textcolor'],
toolbar: "styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media forecolor backcolor",

file_browser_callback: Quivive
});

function Quivive(field_name, url, type, win) {
var file = "";
if(navigator.appName.indexOf('Microsoft')!=-1)
file = modalDialogShow('Quivive/Quivive-File-Manager.php?filemanager=mce',1024,600);
else
win.open('../../../../Quivive/Quivive-File-Manager.php?filemanager=mce4&mod='+field_name, 'ImageBrowser', 'width=1024,height=600,scrollbars=no,status=yes,location=no,resizable=yes,dependent');

if(file > "") {
document.getElementById(field_name).value = file;
win.ImageDialog.getImageData(file);
}}

function modalDialogShow(url,width,height) {
var input = window.showModalDialog(url,window,"dialogWidth:"+width+"px;dialogHeight:"+height+"px;scroll:no;edge:Raised;center:Yes;help:No;Resizable:yes;Maximize:yes");
return input;
}

</script>

<!-- End Quivive File-Manager Code -->

Hint: Do no forget to edit the path to Quivive File-Manager and CKEditor!

You can find and download the latest version of TinyMCE on http://www.tinymce.com/.