htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Image Manager Wei Zhuo Initial directory selection


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


areddan
New User

Jan 13, 2005, 11:26 AM

Post #1 of 2 (14945 views)
Shortcut
Image Manager Wei Zhuo Initial directory selection Can't Post

Hi,
I've attached the modified manager.js script, if an image is highlighted and you click on image property buttons, this little mod will navigate the directory tree in the popup to go to the correct directory.

In my case i'm using a direcory called 'cimgs' as the base directory so you'll have to change your script to use something similar for your specific case.

Below is the additional code, its inserted in the assets/manager.js file

after the if(param) block

//aredits13012004
var ss = document.getElementById('f_url');
if (ss.value !="")
{
var re = new RegExp ('.*/cimgs/', 'gi') ;
var newstr = ss.value.replace(re, '') ;
re = new RegExp ('[a-z0-9_%\.]+$', 'gi') ;
newstr = newstr.replace(re, '') ;
re = new RegExp ('/$', 'gi') ;
newstr = newstr.replace(re, '') ;
var newdir = '%2F'+newstr+'%2F';
alert(newstr);
var csel = document.getElementById('dirPath');
var ckDir = '';
for(var i = 0; i < csel.length; i++)
{
ckDir = csel.options.text;

if(ckDir == '/'+newstr+'/')
{
csel.selectedIndex = i;

}
}
changeDir(newdir);
}
//aredits13012004

Best of luck,
Alan Reddan Silverarm Solutions PHP Dublin Ireland



(This post was edited by areddan on Jan 13, 2005, 11:27 AM)
Attachments: manager.js (6.25 KB)


SmegmaGun
Novice

Jan 13, 2005, 11:41 AM

Post #2 of 2 (14937 views)
Shortcut
Re: [areddan] Image Manager Wei Zhuo Initial directory selection [In reply to] Can't Post

Very nice thanx!! was looking for something like this



Greetz Remi

 
 
 


Search for (options)