FCKEditor File Browser Plugin for TinyMCE Editor

Wednesday, March 1, 2006

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

Version 2.0

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

#1
On the May 11, 2006, Andrew Tetlaw wrote:

To the bloke who left such a nice comment and complimented my rocket. Sorry mate, I borked your comment in the database. Thanks anyway.

#2
On the May 18, 2006, jack wrote:

hi,
something similar was done here:
http://p4a.sourceforge.net/tinyfck

#3
On the May 20, 2006, Jean Louis wrote:

Is it possible to change userfiles subfolders path exemples
change /File to /documents
change /Image to /pictures
Thanks !!!

#4
On the May 21, 2006, John Mitchell wrote:

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

#5
On the May 22, 2006, Andrew Tetlaw wrote:

John Mitchell, 1 and 2 go into 3. You should read this page from the manual:
http://tinymce.moxiecode.com/tinymce/docs/installing.html

#6
On the May 23, 2006, John Mitchell wrote:

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

#7
On the May 29, 2006, Andrew Tetlaw wrote:

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.

#8
On the June 8, 2006, iBob wrote:

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

#9
On the June 27, 2006, Tom wrote:

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>

#10
On the July 13, 2006, lenzai wrote:

It popup a window with error msg:

HTTP 404 - File not found
Internet Information Services

Pls help, thanks!

#11
On the July 18, 2006, Kevin wrote:

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

#12
On the August 17, 2006, Constantinos wrote:

How could i use the tiny mce plugin with java?? Is there a connector for java??

#13
On the August 21, 2006, pHyrExiaN wrote:

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

#14
On the November 2, 2006, ashul shah - eduka (website) wrote:

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

#15
On the November 2, 2006, John McNeil wrote:

This is very cool. Thanks for doing it. We use it both in tiny_mce ad seperatly in LabSynch

#16
On the November 28, 2006, Art wrote:

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

#17
On the December 3, 2006, Peter wrote:

It popup a window with error msg:

HTTP 404 - File not found

Pls help, thanks!

#18
On the December 3, 2006, Peter wrote:

Everything ok now ...

Great job! Thanks for making this available.

Compliments from ITALY :-)

#19
On the December 3, 2006, Peter wrote:

In italian language ???
is there some patch ???

#20
On the December 3, 2006, Andrew Tetlaw wrote:

Are you volunteering Peter? ;)

#21
On the December 4, 2006, Peter wrote:

Yes i'm Andrew :-)

#22
On the December 15, 2006, Peter wrote:

Hi
how can i do for create a link to URL ???
for example : www.libero.it 

thanks

#23
On the December 25, 2006, Matt Newboult wrote:

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?

#24
On the January 8, 2007, Larry Ludwig wrote:

Great stuff.
Simple. Effective.

Thanks for posting.

Larry

#25
On the February 22, 2007, cpeter wrote:

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" />';

}

#26
On the March 1, 2007, ximo wrote:

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.

#27
On the March 2, 2007, Andrew Tetlaw wrote:

Hey thanks guys, I'll look into it.

#28
On the March 22, 2007, Christian wrote:

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

#29
On the March 30, 2007, Lars wrote:

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. 

#30
On the April 9, 2007, Guillermo Castillo wrote:

Is it possible to change userfiles subfolders path exemples
change /File to /documents
change /Image to /pictures
Thanks !!!

giskrac@gmail.com

#31
On the April 20, 2007, Mike wrote:

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

#32
On the June 1, 2007, AC wrote:

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!

#33
On the July 17, 2007, Rudy wrote:

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

#34
On the August 1, 2007, Dan wrote:

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

#35
On the August 13, 2007, Bruce wrote:

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

#36
On the August 16, 2007, lo.j wrote:

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.


#37
On the September 7, 2007, bssllc wrote:

on the fix by cpeter...which files do i modify to get the initial image preview to load correctly.  please clarify...thanks.

#38
On the September 20, 2007, pea wrote:

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?

#39
On the September 26, 2007, FileTester wrote:

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

#40
On the November 15, 2007, Rob Schmitt wrote:

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

#41
On the January 8, 2008, adam wrote:

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?

#42
On the January 22, 2008, BrEaThE wrote:

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

#43
On the February 3, 2008, Michel Weegerink wrote:

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?

#44
On the February 3, 2008, Ramoney wrote:

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.

#45
On the March 10, 2008, Erik wrote:

Hi,

Any one has a working voersion for TinyMCE release 3?

When opening IMAGE in 3.0 there is no browse button. ?!?!?!?

Erik@NL

#46
On the March 18, 2008, Felipe Grajales wrote:

Erik@NL,

any advance with browse button ?

Felipe

#47
On the March 25, 2008, Felipe Grajales wrote:

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.

#48
On the March 29, 2008, Niklas wrote:

Is there a release for asp/netconnector or is this project closed.

#49
On the April 20, 2008, Steve noone wrote:

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

#50
On the April 22, 2008, Adam wrote:

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

#51
On the April 25, 2008, David Martin wrote:

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

#52
On the April 25, 2008, Edward Lynn wrote:

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?

#53
On the May 2, 2008, oppez wrote:

Can you post a working example? I have yet to see anyone get this working.

#54
On the May 2, 2008, Andrew Tetlaw wrote:

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

#55
On the May 13, 2008, TimE wrote:

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');()

#56
On the May 27, 2008, iti wrote:

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?

#57
On the May 27, 2008, Igor Shvydok wrote:

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

#58
On the June 9, 2008, gOk wrote:

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

#59
On the June 9, 2008, gOk wrote:

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"

#60
On the July 2, 2008, raymanexe wrote:

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>

#61
On the July 3, 2008, Andrew Fluke wrote:

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

#62
On the July 3, 2008, raymanexe wrote:

thanks its working now. :)

#63
On the July 5, 2008, Marcello wrote:

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

#64
On the July 23, 2008, noonoi wrote:

raymanexe,

Please try to replace 

"tinymce/jscripts/tiny_mce/plugins/simplebrowser/browser.html"

with

"../simplebrowser/browser.html"

#65
On the July 28, 2008, serge wrote:

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

#66
On the August 18, 2008, Thomas wrote:

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?

#67
On the August 21, 2008, otari wrote:

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>

#68
On the October 9, 2008, src wrote:

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!

#69
On the October 9, 2008, src wrote:

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

#70
On the October 24, 2008, Thavi wrote:

I get this error: Image browser URL not set. How can i fix this?

#71
On the November 20, 2008, Julian wrote:

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

#72
On the June 19, 2009, Jeff wrote:

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?

#73
On the June 26, 2009, Marios wrote:

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}

#74
On the August 5, 2009, martijn peek wrote:

Hello ,

Is there anyone who has this plugin working on tiny mce version 3.2.5 ?

regards


martijn

#75
On the August 26, 2009, Garrett wrote:

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!

#76
On the October 4, 2009, Adin Aronson wrote:

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

#77
On the December 10, 2009, josh wrote:

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?

#78
On the July 14, 2010, Alfred wrote:

The URL (http://www.ingenian.com/tiny_mce_3.0.5_with_simplebrowser.zip) is no longer working.

Is there any alternate url?

Thanks.

#79
On the August 25, 2010, Chester wrote:

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?

#80
On the October 14, 2010, Arun wrote:

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

Random outings from a chaotic mind

The Dexagogo Rocket Australian Web Industry Association logo

Delicious

Twitter