Hi
CKFinder function perfectly, but has now added a plugin called imgmap in FCKeditor and when I use the "Browse Server" then CKFinder open up and everything looks good .. But, when I click on an image CKFinder will not close again, and there is no URL in txtUrl in imgmap.
What can be wrong
Here are the codes in imgmap for browsing the server
function BrowseServer()
{
OpenFileBrowser(
FCKConfig.LinkBrowserURL,
FCKConfig.LinkBrowserWindowWidth,
FCKConfig.LinkBrowserWindowHeight ) ;
}
function SetUrl( url, width, height, alt )
{
GetE('txtUrl').value = url ;
if ( alt )
GetE('txtAlt').value = alt;
}
And here is the code in popup.html belonging imgmap
<label for="txtUrl" fcklang="DlgImgURL">URL</label>
<input id="txtUrl" style="width: 100%" type="text" onchange="SetUrl(this.value)" />
<input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" style="display:none"/>
Best regards Erling
CKFinder function perfectly, but has now added a plugin called imgmap in FCKeditor and when I use the "Browse Server" then CKFinder open up and everything looks good .. But, when I click on an image CKFinder will not close again, and there is no URL in txtUrl in imgmap.
What can be wrong
Here are the codes in imgmap for browsing the server
function BrowseServer()
{
OpenFileBrowser(
FCKConfig.LinkBrowserURL,
FCKConfig.LinkBrowserWindowWidth,
FCKConfig.LinkBrowserWindowHeight ) ;
}
function SetUrl( url, width, height, alt )
{
GetE('txtUrl').value = url ;
if ( alt )
GetE('txtAlt').value = alt;
}
And here is the code in popup.html belonging imgmap
<label for="txtUrl" fcklang="DlgImgURL">URL</label>
<input id="txtUrl" style="width: 100%" type="text" onchange="SetUrl(this.value)" />
<input id="btnBrowse" onclick="BrowseServer();" type="button" value="Browse Server" fcklang="DlgBtnBrowseServer" style="display:none"/>
Best regards Erling
Re: Plugin - imgmap
Assuming that we are talking about this great plugin: imagemaps, you could try the following:
open plugins/imgmap/jscripts/functions.js and before
(around line 315)
add this code:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Plugin - imgmap
Thanks, now it works fine
Sincerely, Erling
Re: Plugin - imgmap
Why is this needed for CKfinder?
(So I can elucidate the need of this in my plugins in a comment)
Re: Plugin - imgmap
CKFinder needs to know which functions should be executed when it works in a popup and a file inside of CKFinder is selected.
There are two things that CKFinder checks to know which function in parent window should be called:
- the existance of "FCK" variable, in such case it is assumed that we're in FCKeditor environment and the "SetUrl" function should be called
- alternatively, instead of opening ckfinder.html, open ckfinder.html?action=js&func=SetUrl&thumbFunc=SetUrl (where func and thumbFunc are the names of javascript functions that should be called when file is selected)
In any case, it shouldn't be a problem if any of the CKFinder integration files was used to open CKFinder in a popup.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+