I was trying to figure out how to enable Logged In Manager Users to use the file browser and Link List in TinyMCE using FDM. After pulling my hair out trying to use a TV or a snippet or hack of FDM it donned on me that I should see what the TinyMCE call is for QuickEdit and lo-and-behold it does everything I wanted it to.
<script language="javascript" type="text/javascript" src="[(base_url)]assets/plugins/tinymce212/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="[(base_url)]assets/plugins/tinymce212/xconfig.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
width : "100%",
height : "400px",
relative_urls : true,
document_base_url : "[(base_url)]",
remove_script_host : true,
language : "en",
elements : "fdmContent",
valid_elements : tinymce_valid_elements,
extended_valid_elements : tinymce_extended_valid_elements,
invalid_elements : tinymce_invalid_elements,
entity_encoding : "named",
cleanup: true,
apply_source_formatting : true,
remove_linebreaks : false,
convert_fonts_to_spans : "true",
onchange_callback : "tvOnTinyMCEChangeCallBack",
external_link_list_url : "[(base_url)]assets/plugins/tinymce212/tinymce.linklist.php",
resource_browser_path : "[(base_url)]manager/media/browser/mcpuk/browser.html?Connector=[(base_url)]manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=[(base_url)]",
file_browser_callback : "fileBrowserCallBack",
theme_advanced_blockformats : "p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address",
plugins : "style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media",
theme_advanced_buttons0 : "",
theme_advanced_buttons1 : "undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_disable : "",
theme_advanced_resizing : false,
theme_advanced_resize_horizontal : false,
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
button_tile_map : false
});
function fileBrowserCallBack(field_name, url, type, win) {
// This is where you insert your custom filebrowser logic
var win=tinyMCE.getWindowArg("window");
win.BrowseServer(field_name);
}
function tvOnTinyMCEChangeCallBack(i){
if (i.oldTargetElement.onchange) {
i.oldTargetElement.onchange();
}
}
</script>
The critical part to change for your code is to make sure that the TinyInit Parameter
needs to be the id of the container of your main content box as in fdmEform.
Also keep an eye on your TinyMCE location. In the default .0.9.6.1 install it is in assets/plugins/tinymce212/
This will enable your Manager Users to access the Link List and the Filemanager as they do when using Quickedit even if Quickedit is disabled.