I am trying to integrate TinyMCE with RoxyFileManager. Can anyone help me with the process ?
Thanks in advance. Cek my code below. I wonder what I should place for the selector
selector:'textarea' or selector: '#tinymce' ?
http://www.roxyfileman.com/TinyMCE-file-browser
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery-1.7.1.js"></script>
<script src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/tiny_mce/tiny_mce_popup.js"></script>
<script src="js/tiny_mce/tiny_mce.js"></script>
<script>tinymce.init({ selector:'textarea' });</script>
<script>
$(function() {
tinyMCE.init({selector: '#tinymce', plugins: 'link image',
toolbar: "link | image", file_browser_callback: RoxyFileBrowser});
});
function RoxyFileBrowser(field_name, url, type, win) {
var roxyFileman = '/fileman/index.html';
if (roxyFileman.indexOf("?") < 0) {
roxyFileman += "?type=" + type;
}
else {
roxyFileman += "&type=" + type;
}
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
if(tinyMCE.activeEditor.settings.language){
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
}
tinyMCE.activeEditor.windowManager.open({
file: roxyFileman,
title: 'Roxy Fileman',
width: 850,
height: 650,
resizable: "yes",
plugins: "media",
inline: "yes",
close_previous: "no"
}, { window: win, input: field_name });
return false;
}
</script>
</head>
<body>
<textarea>Easy (and free!) You should check out our premium features.</textarea>
</body>
</html>