Closed a2exfr closed 7 years ago
Hmm, this could become tricky....
We need to destroy the gp_editor.FinderSelect once used... I'll try it
Once you wrote it, I just remember that I have done it before in otherr plug in!!! I have to look my folders)) I have two image select and editor there
please try this:
gp_editor.selectUsingFinder = function(callback_fn, input_selector){
gp_editor.FinderSelect = function(fileUrl){
if (fileUrl != "") {
callback_fn(fileUrl, input_selector);
}
setTimeout(function(){
gp_editor.FinderSelect = null;
}, 150);
return true;
};
var finderPopUp = window.open(gpFinderUrl, 'gpFinder', 'menubar=no,width=960,height=450');
if( window.focus ){
finderPopUp.focus();
}
}; // gp_editor.selectUsingFinder --end
my current codebase i not ready to commit.
or better
delete gp_editor.FinderSelect;
instead of
gp_editor.FinderSelect = null;
but even ...
gp_editor.FinderSelect = false;
should work. Anything that doesn't return a 'function' type will prevent the execution.
I was doing this like this in but in callback function
gp_editor.FinderSelect="";
shame that I forgot about this
LOL, yes, ="" will also work.
I was doing this like this in but in callback function
Since the callback_fn can be anything, doing it in FinderSelect with setTimeout will be easier and more safe.
mega lol that I made new issue about this, despite solve it in the past)
I agree about timeot, let me test it.
I made new issue about this, despite solve it in the past
Haha, yes, now I recall that we talked about this one earlier. Repetition improves memory :)
Just test it work good. Made [ pull request] (https://github.com/juek/CustomSections/pull/18)
Thx. I'm currently working on module/component loader. Hope to commit soon.
When have image field and ckeditor field in one custom editor, when you want insert image in ckeditor field this image goes to editor image field) Can we divide this callback? On first look I do not know where to dig...