You are not logged in.

#1 2010-03-10 13:55:15

joez
Member
Registered: 2010-03-10
Posts: 5

dynamic set the root path for image manager

Hi,

I use ASP.NET 2.0
I've created a user control which has tiny editor and integrated image manager as plugin for the editor.
My webpage must have 2 editors so I call my user control twice.
Everything is fine except the default path for each image manager. I want my 2 editors open image dialog in the different paths.
I've tried to set on both sessions and on init of tinyMCE but no lucky.

tinyMCE.init({

imagemanager_filesystem_rootpath: "xxx"

})


Session["imagemanager.filesystem.rootpath"] = "xxx"


Do you know the way to dynamic setting path?
Or maybe I did the wrong thing.

Thanks in advance,
J

Offline

 

#2 2010-03-10 14:12:31

spocke
Administrator
From: Sweden, Skellefteċ
Registered: 2004-11-25
Posts: 11471
Website

Re: dynamic set the root path for image manager

Use imagemanager_filesystem_rootpath but remember it can only set it to a path within the specified one in the web.config for security reasons.

So something like this:
imagemanager_filesystem_rootpath : '{0}/dir'

Would use the filesystem.rootpath on the server and append /dir to it.


Best regards,
Spocke - Main developer of TinyMCE

Offline

 

#3 2010-03-11 04:33:45

joez
Member
Registered: 2010-03-10
Posts: 5

Re: dynamic set the root path for image manager

It doesn't work for me.

The real folder is C:\www\images\news

on web.config (in plugin/imagemanager folder), I've set
   <add key="filesystem.rootpath" value="C:\www\images" />

and on my page, I've set
   tinyMCE.init({

           imagemanager_filesystem_rootpath: "{0}/news"

})

Note:
I've tried to set all cases below,
   imagemanager_filesystem_rootpath: "{0}/news"
   imagemanager_filesystem_rootpath: "{0}\news"
   imagemanager_filesystem_rootpath: "C:\www\images\news"
However, image manager still open the root path at C:\www\images instead of C:\www\images\news

Did I do anything wrong?

J

Offline

 

#4 2010-03-11 12:18:37

spocke
Administrator
From: Sweden, Skellefteċ
Registered: 2004-11-25
Posts: 11471
Website

Re: dynamic set the root path for image manager

The name of the option is: imagemanager_rootpath http://wiki.moxiecode.com/index.php/MCI … s/rootpath


Best regards,
Spocke - Main developer of TinyMCE

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB