FCKEditor File Browser Plugin for TinyMCE Editor
Wednesday, March 1, 2006I've ported the standard file browser from FCKEditor as a plugin for the TinyMCE rich text editor. Why the hell did I do that you ask? Well, the FCKEditor file browser is simple and useful. TinyMCE does not have a free file browsing component. I wanted to use TinyMCE and I wanted a file browser...
Updated: Version 2.1 for TinyMCE 2.0.3 and above is available.
About
There is a file and image management plugin for TinyMCE but it is a commercial product. The FCKEditor file browser is implemented largely as a kind-of XML-RPC system and is thus very portable. All I have to do was wrap the functions that open the dialog and return a value in a TinyMCE plugin wrapper and the rest came along for free.
So for the 3 people in the world who have switched to TinyMCE but lament the lack of a free file browser like the one in FCKEditor enjoy!
Please don't forget that this plugin exists because of the hard work people do over at FCKEditor.
Instructions
To install unzip the plugin into the TinyMCE 'plugins' folder in a folder called 'simplebrowser'. You need to use the TinyMCE 'advanced' theme, and add 'simplebrowser' to your plugin list. The file browser buttons only appear if you use the 'avdlink' and 'advimage' plugins.
There are also 3 plugin options to set, 'plugin_simplebrowser_browselinkurl', 'plugin_simplebrowser_browseimageurl', 'plugin_simplebrowser_browseflashurl', which are exactly the same as their FCKEditor counterparts.
All the connectors should work, although I've not test any of them! The filebrowser internals are unchanged and so the FCKEditor documentation for server-side connectors should apply.
License
Both TinyMCE and FCKEditor are released under the LGPL and thus so is this plugin. If you actually find this useful, please consider leaving a comment.
Version 2.1 (TinyMCE 2.0.3 and above) - Latest Version
Configuration goes like this (PHP connector shown):
tinyMCE.init({
theme : "advanced",
plugins : "simplebrowser",
plugin_simplebrowser_width : '800'; //default
plugin_simplebrowser_height : '600'; //default
plugin_simplebrowser_browselinkurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php'
}); Download for TinyMCE 2.0.3 and above: simplebrowser2.1.zip
Change Log
Version 2.1
- Updated connectors from FCKEditor 2.2
- Fixed connectors/test.html initial blank page not found error in iframe
- updated documentation
Version 2.0
- Changed for new TinyMCE 2.0.3 plugin format and tidy up
- Proper packaging - editor_plugin_src.js
- Plugin automatically sets 'file_browser_callback' option
- Added height and width options
- Also uploaded to
SourceForge
Version 1.0 (TinyMCE 2.0.2)
Configuration goes like this:
tinyMCE.init({
theme : "advanced",
plugins : "simplebrowser",
file_browser_callback : "TinyMCE_simplebrowser_browse", // This is required
plugin_simplebrowser_browselinkurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Connector=PATH/TO/YOUR/CONNECTOR',
plugin_simplebrowser_browseimageurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=PATH/TO/YOUR/CONNECTOR',
plugin_simplebrowser_browseflashurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Flash&Connector=PATH/TO/YOUR/CONNECTOR'
}); Use the built in option file_browser_callback : "TinyMCE_simplebrowser_browse" to set the callback for the file browser.
Download for TinyMCE 2.0.2 and under: simplebrowser.zip
80 Comments
To the bloke who left such a nice comment and complimented my rocket. Sorry mate, I borked your comment in the database. Thanks anyway.
hi,
something similar was done here:
http://p4a.sourceforge.net/tinyfck
Is it possible to change userfiles subfolders path exemples
change /File to /documents
change /Image to /pictures
Thanks !!!
Is it possible to help me please.
1. Where do I find file with "plugin list"?
2. Where do I set the 3 plugin options?
3. Where do I insert the tinyMCE.init code?
The plugin is exactly what I need but I am new to this and a bit lost.
Many thanks in advance
John Mitchell
John Mitchell, 1 and 2 go into 3. You should read this page from the manual:
http://tinymce.moxiecode.com/tinymce/docs/installing.html
Thanks for your reply. I know I'm very much a beginner here but I had already read the manual and sadly am still lost. I didn't really understand your reply. I still can't find where to put the code.
Please help
Regards
John Mitchell
Well, John, the plugins list and options all go into your tinyMCE.init() call. You can see code examples above. The plugins list is the plugins: "", line above.
The init() call goes where ever you want tinyMCE to appear.
We love the idea, but we won't get it working :-(.
Can you please help us?
- we don't see any simplebrower image in the toolbars.
How can we solve this?
Thnx
John,
The tinyMCE.init goes into the head of the document you want to edit as a script. Here is example:
<head>
<title>HAM Site Content Editor</title>
<script language="javascript" type="text/javascript"
src="../TINYMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
theme_advanced_layout_manager : "SimpleLayout",
mode : "textareas",
plugins : "save, print, simplebrowser",
plugin_simplebrowser_browselinkurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Connector=\
connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Imag\
e&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Flas\
h&Connector=connectors/php/connector.php',
theme_advanced_buttons2_add : "save, print",
save_enablewhendirty : true, // set this to make the save button dimmed until editing changes have been made
cleanup: false // this setting saves the HTML tags in the textarea
});
</script>
It popup a window with error msg:
HTTP 404 - File not found
Internet Information Services
Pls help, thanks!
lenzai,
check the path for settings. On my IIS system I had to use a path of
../simplebrowser/browser.html
instead of what is shown above. The log files will give you clues. the "../" was need because it was appending to the advlink directory.
Good luck
How could i use the tiny mce plugin with java?? Is there a connector for java??
First: Tank you for your great job. I'm using TinyMCS and FCKeditor in different project. You plugin works fine and makes my live easier!
However: there is an error in your readme.txt:
plugin_simplebrowser_width : '800'; //default
plugin_simplebrowser_height : '600'; //default
has to be
plugin_simplebrowser_width : '800', //default
plugin_simplebrowser_height : '600', //default
Otherwise, TinyMCe cannot work ("," instead ";")
Greeting from Germany :-)
Hey Andrew
I know its an old comment but (3) John Lewis - FCK version 2.3.2 (released 16 october) allows changing the folder names
A
This is very cool. Thanks for doing it. We use it both in tiny_mce ad seperatly in LabSynch
I was just about to try to port the FCKEditor browser function for use with TinyMCE when I found this site.
Great job! Thanks for making this available.
Thanks, Art
It popup a window with error msg:
HTTP 404 - File not found
Pls help, thanks!
Everything ok now ...
Great job! Thanks for making this available.
Compliments from ITALY :-)
In italian language ???
is there some patch ???
Are you volunteering Peter? ;)
Yes i'm Andrew :-)
Hi
how can i do for create a link to URL ???
for example : www.libero.it
thanks
Great work. I've got it all working in Opera with php, but am having problems with getting it working on Firefox 2.0. When I display the list of files in the Resources Browser I get a Javascript error:
uncaught exception: Permission denied to call method XMLHttpRequest.open
Like I say all works fine in Opera. Confused as to why Firefox complains. Anyone have any ideas?
Great stuff.
Simple. Effective.
Thanks for posting.
Larry
HI,
I discovered a bug in the editor_plugin.js file. When an image is selected that is not displayed in the preview window.
The fix is:
browserCallback : function(returnValue) {
if(!returnValue) return;
TinyMCE_SimpleBrowserPlugin.options['target'].document.forms[0].elements[TinyMCE_SimpleBrowserPlugin.options['field']].value = returnValue;
var elm = TinyMCE_SimpleBrowserPlugin.options['target'].document.getElementById('prev');
if (returnValue == "")
elm.innerHTML = "";
else
elm.innerHTML = '<img id="previewImg" src="' + returnValue + '" border="0" />';
}
Thanks a lot for this plugin, Andrew! I was banging my head trying to get TinyMCPUK/TinyFCK to work when I came across this. You saved me from a headache :)
As for the bugfix from cpeter, it will produce an error when using the simplebrowser in the link dialog. Apply cpeters bugfix, then change the last else-if to:
if (elm) {
if (returnValue == "")
elm.innerHTML = "";
else
elm.innerHTML = '<img id="previewImg" src="' + returnValue + '" border="0" />';
}
This checks if elm (the preview window) actually exists, which it doesn't in the case of the links dialog. Also remember to edit in editor_plugin_src.js, then add the changes to editor_plugin.js (compressed one-liner of the former).
Some other useful tips:
There is an error in the readme and the examples on this page. At the end of each line, there should be a , (comma) and not a semicolon (;).
Remember that the last of these lines should have a , (colon) if it's not the last of all lines in tinyMCE.init.
Also remember to enable the callback for your programming language (PHP I assume), or you will get an error trying to load the simplebrowser.
Hey thanks guys, I'll look into it.
Nice tool, but my FileBrowser won't upload files. I can browse make new folder... but upload won't work.
if i use test.html the upload says: File uploaded with no errors, but no file appears on the server.
any ideas ?
THX
Christian
Great plugin!
Got it all working in my Tinymce editor, i also had to use the ../filebrowser path in my tinymce to get it working.
Is it possible to change userfiles subfolders path exemples
change /File to /documents
change /Image to /pictures
Thanks !!!
giskrac@gmail.com
Thanks a million for this. Great work. I was getting a 404 on the popup until I changed the plugin lines to
plugin_simplebrowser_browselinkurl : '../simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : '../simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : '../simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',
I'm struggling here. Installed all OK, and the little button for source appears just fine next to the normal file URL on the pop-up, but when I click it I get the framed pop-up window, but no contents.
It's as if the path to the connector is wrong (if I jumble up the path I get the same results) yet I'm sure it's absolutely right.
Please help!
I'm running an implementation of this and everything is working great with the exception of one thing.
Before I get into that, I have to say thank you, this is a fantastic resource for the community at large. Your hard work is greatly appreciated.
The issue I am having is that no matter what I seem to do, I can not get an absolute URL to work with simplebrowser.
I have tried
$Config['UserFilesPath'] = "http://www.domain.ext/images";
$Config['UserFilesPath'] = "http://www.domain.ext/";
I have my
$Config['UserFilesAbsolutePath'] = '/root/webpages/domain.ext/public/images/' ;
The problem is that after an image is selected the path returned has a " %3A " subsitiuted for the " : " in http:// .... so the path to the image is always
http%3A//domain.ext/iamges/Image/filename.ext
Any help anyone can offer would be greatly appreciated.
tia,
r
Andrew, great plugin! I saw it in action in cmsmadesimple and have installed in my own cms based on codeIgniter.
Unfortunately I am getting a js error
oNode.attributes.getNamedItem("enablethumbs") has no properties
Any idea where I have gone wrong here?
Cheers,
Dan
Hi..
I'm getting the same error as Dan (se post above)..
Its a strange one, because in another application we did, no such error..
It must be something we are doing wrong..
If anyone know whats it might be please post here..
take care
Bruce
Thank's!!! this is perfect! i was looking for that kind of plugin when i found yours. Good idea to use fck file manager!
Greetings from Belgium!
note:
i think that the post 25 by cpeter (about the bugfix for preview displaying after file selection) should be more explicit.
tip:
in the file "frmresourceslist.html", around line 77, you can replace:
oCell.innerHTML = sLink + '<img alt="" src="images/icons/' + sIcon + '.gif" width="16" height="16" border="0"></a>' ;
with:
oCell.innerHTML = sLink + '<img src="'+ fileUrl+'" width="70" border="0"></a>' ;
in order to have a thumbnail displayed instead of the file icon. it works only when browsing images of course... you will need to use the icon when browsing files, should be easy to script.
on the fix by cpeter...which files do i modify to get the initial image preview to load correctly. please clarify...thanks.
Hi,
Thanks for this tool. I have been through and set it up as suggested, but it doesn't even display an icon in the tinyMCE editor (no errors).
I have added it to 'plugins', 'theme_advanced_buttons2' as well as the 'plugin_simplebrowser_*' options.
Any ideas?
Pea... Care to show us all how you done it??
This is how I have mine and I'm still getting page can not be displayed...
This is how the loader.js looks
function customTinyMCE_init(sName)
{
if (!sName)
{
return false;
}
tinyMCE.sTextareaName = sName;
tinyMCE.init({
theme : 'advanced',
mode : 'exact',
elements : sName,
plugins : "simplebrowser",
plugin_simplebrowser_browselinkurl : '../simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : '../simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : '../simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',
theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,separator,cut,copy,paste,separator,anchor,link,unlink",
theme_advanced_buttons2 : "fontselect,fontsizeselect,separator,forecolor,image,code",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "center",
theme_advanced_statusbar_location : "bottom",
cleanup : false,
convert_newlines_to_brs : true,
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : true,
convert_urls : "false",
relative_urls : "true"
});
This how my config.php file looks..
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation today?"
*
* File Name: config.php
* Configuration file for the File Manager Connector for PHP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
global $Config ;
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/UserFiles/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\MySite\UserFiles\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
$Config['AllowedExtensions']['Media'] = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg') ;
$Config['DeniedExtensions']['Media'] = array() ;
?>
This is done in phpFox.... If that helps any.. When I click on the image to upload I have the browse button but it is telling me this when I try to click the browse button..
This is the url it is trying to pull.. I have changed my site name to something else for personal reasons.
http://www.testsite.com/design/tiny_mce/themes/advanced/tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php
Here is the picture of the page...
http://i173.photobucket.com/albums/w42/Seminole3106/oooppsss.jpg
Thanks for your post. I had a requirement to get this working with TinyMCE on Drupal, so I've written a little instructional guide on how to set it all up:
http://webdeveloper.beforeseven.com/drupal/using-fckeditor-file-browser-tinymce-drupal
After installation, when I click on the button within tinyMCE to launch teh file browser, I get the following error message:
Image browser URL not set
Anybody have any suggestions? Have you seen it before?
I can't see the button to upload files.. i have the advanced theme and advlink/advimage plugins... but where is the button??
Please help!
Thanks for your work ;)
I have updated to TinyMCE version 3.
After updating the language files it looks like it is working!
PROBLEM: Looks like the pugin 2.1 simplebrowser does not work anymore. The button is available but will no popup the selection window when you select the button!
Does anyone know how to update the plugin so it will work in TinyMCE 3.0?
Hello,
thank you for the plugin. But, tt does not work the way I expect it to work.
Task:
Insert a "file"-link with TinyMCE.
Problem:
When I browse for a link-url the "fckeditor-file-browser-plugin-for-tinymce-editor" window opens and I do see the file I want to link to. But when I select (click) the file the "fckeditor-file-browser-plugin-for-tinymce-editor" window remains open. The problem is consistant within FF, IE7 and IE6.
I expected it to work the same way as it does with images:
1. "fckeditor-file-browser-plugin-for-tinymce-editor" window opens
2. I select (click) the desired image (then file)
3. "fckeditor-file-browser-plugin-for-tinymce-editor" window closes and a relative path to the desired image (then file) was inserted into the link-url field of TinyMCE.
Am I a moron? Is this a bug?
Any help is appreciated.
Hi,
Any one has a working voersion for TinyMCE release 3?
When opening IMAGE in 3.0 there is no browse button. ?!?!?!?
Erik@NL
Erik@NL,
any advance with browse button ?
Felipe
For all the guys who are struggling with a tiny mce file uploader / browser, finally here is a working version of simplebrowser (Initially made by Andrew Tetlaw) for TINY MCE 3.0.5:
http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip
Is working with php.
It may require a little bit of adjustment depending of the web servers and connectors languages.
Is there a release for asp/netconnector or is this project closed.
Felipe, I'm having trouble with tiny_mce_3.0.5_with_simplebrowser.zip getting error "win has no properties" in FF2. Console is pointing to plugins/simplebrowser/frmresourceslist.html
Line: 96
the %3A problem seems to be with FCKEditor using escape() on the whole url, and so the colon in http:// is getting replaced.
I describe a fix in detail here:
http://forum.cmsmadesimple.org/index.php/topic,11101.0.html
Hi,
I am very excited about this plugin! I have no succeded in getting it to work yet as I get an alert when it loads saying that the connector is disabled but I have triple checked my edits and uploaded the config.php file again and I have $Config['Enabled'] = "true";
Anyone have a clue what's up there? Could it be a path issue? Like the connector is actually not found?
TIA!!
jg
I'm using the version bundled at http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip but I get a javascript error when clicking the button to browse. I'm getting "f has no properties" relating to line 6767 of tiny_mce.js. Other people on the web are posting about this same error with tiny_mce, does anyone have a resolution to this one please?
Can you post a working example? I have yet to see anyone get this working.
Yep, I made this for TinyMCE 2.03 but I haven't updated it since. So if you use 3.5 it probably wont work.
If you look a few comments above Filipe says he has it working:
http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip
I'm also using the 'tiny_mce_3.0.5_with_simplebrowser.zip' version.
I get the same error as Edward Lynn:
f is undefined
_init()tiny_mce.js (line 1)
openBrowser("src", "image", "theme_advanced_image_image_browser_callback")tiny_mce_popup.js (line 127)
openBrowser("srcbrowser", "src", "image", "theme_advanced_image_image_browser_callback")form_utils.js (line 62)
javascript:openBrowser('srcbrowser','src',%20'image','theme_advanced_image_image_browser_callback');()
hi
I have installed the tiny_mce_3.0.5_with_simplebrowser.zip files. when I click the new image icon on tiny the fck window opens, but I see no folders/files (they are there), just two white windows. if I create a new folder, then I see them all. any Idea what can cause it?
Hi all,
I got next error when tiny is loaded.
Error: tinyMCE.importPluginLanguagePack is not a function
Source: http://www.url.com/new/tiny_mce/plugins/simplebrowser/editor_plugin.js
Line: 1
[FIX]
For Edward Lynn, TimE and those who's having the "f has no properties" error on FireBug or the " 'undefined' is null or not an object " in Internet Explorer.
In the Bundle package, you MUST use the "file_browser_callback", as you might be noticed. And the callback around this page doesn't work, then, you must use this:
[code]
tinyMCE.init({
// ..
file_browser_callback : 'simplebrowser_browse', // And not the 'TinyMCE_simplebrowser_browse'.
// ..
});
[/code]
;)
PS; Don't forget to configure the plugin conector on "tiny_mcepluginssimplebrowserconnectorsphpconfig.php"
PS2; Sorry for the bad english.
Hope I'd help somebody, cya!
Hehe, the post cleaner didn't liked my backslashes.
PS; Don't forget to configure the plugin connector on:
"tiny_mce/plugins/simplebrowser/connectors/php/config.php"
i can't make it to work. can you check my code pls let me know what the problem thanks
<script type="text/javascript" src="includes/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "safari,spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,pagebreak,imagemanager,filemanager,simplebrowser",
plugin_simplebrowser_browselinkurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,media",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
content_css : "example_data/example_word.css",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
external_link_list_url : "example_data/example_link_list.js",
external_image_list_url : "example_data/example_image_list.js",
flash_external_list_url : "example_data/example_flash_list.js",
template_external_list_url : "example_data/example_template_list.js",
theme_advanced_resize_horizontal : false,
apply_source_formatting : true,
spellchecker_languages : "+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv"
});
</script>
In tiny_mce 3.x versions you have to enable compat2x plugin to make it work.
If compat2x plugin is not enabled, you get the following error:
tinyMCE.importPluginLanguagePack is not a function
thanks its working now. :)
I get this error: "Image browser URL not set."
on the config.php i've changed $Config['UserFilesPath'] = '../albuns/' ;
and the main file...
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,simplebrowser,compat2x",
plugin_simplebrowser_browseimageurl :'../tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
raymanexe,
Please try to replace
"tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html"
with
"../simplebrowser/browser.html"
hi, first of all thanks andrew for the plugin and all the people who help with the comments!
i installed the version of Fellipe from here:
http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip
i came as far as seeing the file browse icon but only after i get an error "Invalid character" on line 1 in IE7XP.
when i click "browse" the fck popup loads up but displays another error: "Unspecified Error" on line 172 of tiny_mce_popup.js:
document.body.innerHTML = t.editor.translate(h);
i continue, and get another surprise:
"Access is denied" error on line 56 of fckxml.js:
oXmlHttp.open( "GET", urlToCall, bAsync ) ;
after all this i get an empty fck file browser window.
in tinyMCE.init i put:
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,compat2x,simplebrowser",
plugin_simplebrowser_width : '800', //default
plugin_simplebrowser_height : '600', //default
plugin_simplebrowser_browselinkurl : 'plugins/simplebrowser/browser.html?Connector=connectors/aspx/connector.aspx',
plugin_simplebrowser_browseimageurl : 'plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx',
plugin_simplebrowser_browseflashurl : 'plugins/simplebrowser/browser.html?Type=Flash&Connector=connectors/aspx/connector.aspx',
file_browser_callback : 'simplebrowser_browse', // And not the 'TinyMCE_simplebrowser_browse'
i also set config.ascx to return true in CheckAuthentication() (currently only on localhost so no security issues).
anybody got a clue what am i doing wrong?
thanks alot everyone
I have added this plugin to an editor that already used TineMCE's imagemanager. The imagemanager no longer pops up when I click the button, but no error messages appear either. What do I have to do to keep using imagemanager for images alongside simplebrowser for other files?
hello, i realy liked this source, its a great thing and want think everyone who did even a lil job for acomplishing such a thing..
i am trying now to install it .. seems instalation went okey.. but when i add simplebrowser to plugins list.. js error appears
here it is (object does not support this property or method)
also when i click brows button nothing happens.. here is whole code:
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "simplebrowser,safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
file_browser_callback : "TinyMCE_simplebrowser_browse", // This is required
plugin_simplebrowser_browselinkurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Connector=connectors/php/connector.php',
plugin_simplebrowser_browseimageurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',
plugin_simplebrowser_browseflashurl : 'tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "tiny_mce/lists/link_list.js",
external_image_list_url : "tiny_mce/lists/image_list.js",
media_external_list_url : "tiny_mce/lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
Fellipe's version (http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip) will work with the following edits:
In tinyMCE.init:
Find:
file_browser_callback : "TinyMCE_simplebrowser_browse", // This is required
Replace With:
file_browser_callback : 'simplebrowser_browse', // And not the 'TinyMCE_simplebrowser_browse'
-----
In iny_mcepluginssimplebrowserconnectorsphpconfig.php
Find:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser/assets/' ;
Replace With:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/(Your Path)/tiny_mce/plugins/simplebrowser/assets/' ;
Find:
$Config['UserFilesAbsolutePath'] = '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser/assets/' ;
REplace With:
$Config['UserFilesAbsolutePath'] = '/(Your Path)/tiny_mce/plugins/simplebrowser/assets/' ;
-----
In iny_mcepluginssimplebrowsereditor_plugins.js
Find:
local_path_to_replace: '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser'
Replace With:
local_path_to_replace: '/(Your Path)/tiny_mce/plugins/simplebrowser'
I think that's it!
(Doh! Posts don't like back slashes.)
Fellipe's version (http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip) will work with the following edits:
In tinyMCE.init:
Find:
file_browser_callback : "TinyMCE_simplebrowser_browse", // This is required
Replace With:
file_browser_callback : 'simplebrowser_browse', // And not the 'TinyMCE_simplebrowser_browse'
-----
In tiny_mce/plugins/simplebrowser/connectors/php/config.php
Find:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser/assets/' ;
Replace With:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/(Your Path)/tiny_mce/plugins/simplebrowser/assets/' ;
Find:
$Config['UserFilesAbsolutePath'] = '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser/assets/' ;
Replace With:
$Config['UserFilesAbsolutePath'] = '/(Your Path)/tiny_mce/plugins/simplebrowser/assets/' ;
-----
In tiny_mce/plugins/simplebrowser/editor_plugins.js
Find:
local_path_to_replace: '/home/hero/apache-tomcat-5.5.25/webapps/yoscua/tiny_mce/plugins/simplebrowser'
Replace With:
local_path_to_replace: '/(Your Path)/tiny_mce/plugins/simplebrowser'
I think that's it!
I get this error: Image browser URL not set. How can i fix this?
I installed your simplebrowser. And it works fine. But i can´t browse. Every time i click browse in the image edit/insert popup i get this error:
SimpleBrowser is undefined
in /tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js
row: 41
I'm having a problem where the simple browser window won't close after I click the filename. I added alert statements to the tinyMCEPopup close function so I know it's running, but the window doesn't close. It puts the filename into the image dialog fine but it leaves the file browser window open. Any ideas?
to jeff:
1. open in editor file: editor tiny_mce_popup.js
2. search for the text: close:function()
3. replace:
close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}
with:
close:function(){var a=this;function b(){if(window.parent.document.title=="FCKeditor - Resources Browser"){a.editor.windowManager.close(window.parent);}else a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}
Hello ,
Is there anyone who has this plugin working on tiny mce version 3.2.5 ?
regards
martijn
You, sir, are a KING. This is EXACTLY what I was looking for. FCKEditor feels clunky and dated to me.. Not to mention, it's pretty slow. I love tinyMCE. better looking, faster code execution... just no file manager. Now I'm SET! Thank you very much!
Finally got this work. Thanks.
For those trying to implement in an ASPX .NET project.
You need to get a hold of FredCK.FCKeditorV2.dll and stick in your bin folder. Plus you need on your server to make sure UserFilesImage has write permissions
i am having trouble getting the simple browser to work. When i copy the code into the page, it removes the icons, and only leaves a save button.
any suggestions?
The URL (http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip) is no longer working.
Is there any alternate url?
Thanks.
I have a problem. I don't see the files. The folder is just displaying "/" and I can't see the files even if I have already allowed all file extensions. I can't see the folders on the left side as well. I can see the Resource Type selector and the footer which has the Create New Folder button and the File uploader. Did I missed something in the configurations?
I hav got javascript error while clicking on browse button. Is it any issue with the paths. Error message was like this :
f is undefined
return f.apply(s || t, Array.prototype.slice.call(arguments, 1));