davy_yg 2 Posting Whiz


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' ?


<!DOCTYPE html>

<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>

$(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;
    roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
     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; 



<textarea>Easy (and free!) You should check out our premium features.</textarea>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.