我正在尝试将TinyMCE与RoxyFileManager集成。任何人都可以帮我完成这个过程吗?
提前致谢。查看下面的代码。我想知道我应该为选择器放置什么
选择器:' textarea的'或选择器:'#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>