We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27708 MODX Staff
    • 2,502 Posts
    I am looking to extend the Front End Document Manager and I want to allow Manager Users to be able to use the FileManager and Link List as they can with QuickEdit from the front end. Currently FDM is calling Tiny directly but I want to be able to get access to whatever editor is set in the user config and be sure that I can allow all functions that Manager Users can access.

    I am looking into how Quick Edit does it but I am no PHP master--I am a PHP grasshopper. I figure that there is a way to access the plugin directly as opposed to just calling the editor directly.

    I also wonder if there is a way to include a RTE widget in the snippet and if that would allow the Manager Users to access the Filemanager and Link List from the front end?

    Any help would be appreciated.

    Jay
      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Take a look at the code in Koops MailinglistX; it also calls the RTE set as the MODx manager default. I didn’t write the code, so I can’t really explain it line by line. It looks like it uses the Rich Text TV input function.

          Updated 23-03-2006 to use default MODx RTE by ConseilsWeb
          http://modxcms.com/forums/index.php/topic,6450.msg87778.html#msg87778
      
      ...
      
      		// Get access to template variable function (to output the RTE)
      		include_once($modx->config['base_path'].'manager/includes/tmplvars.inc.php');
      	  
      		$event_output = $modx->invokeEvent("OnRichTextEditorInit", array('editor'=>$modx->config['which_editor'], 'elements'=>array('tvmailMessage')));
      	
      		if(is_array($event_output)) {
      			$editor_html = implode("",$event_output);
      		}
      		// Get HTML for the textarea, last parameters are default_value, elements, value
      		$rte_html = renderFormElement('richtext', 'mailMessage', '', '', '');
      		
      		echo $rte_html;
      		
      		echo $editor_html;
      
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 27708 MODX Staff
        • 2,502 Posts
        Thanks Susan. I will am looking at this now. I have an inkling as to how to include this now. I will play with it and see.

        All the best,

        Jay
          Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
          • 27708 MODX Staff
          • 2,502 Posts
          I solved this by adding a slightly modified version of the tinyMCE call used by Quickedit. This allows the managers to access the same full Filebrowser and Linklist.

          It should be easier to call this without having to call it entirely. I could place it in a chunk and add it to the document or template but that seems busy.

          Jay
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub