Hello,
I have a plugin that opens an Iframe dialog.
I would like to use the server/filebrowser for the user to select an image.
but i am unsure how to get the results of what image/doc the user selected back in my plugin.
so, in my dialog.js contents: i added
and when i click the browser server (which is ckfinder) , it opens OK
My questions i do not understand where the info goes when the user selects the image in the browser.
I found this code somewhere else, but it messed up all my other plugings.
Thanks for any help
Randy
I have a plugin that opens an Iframe dialog.
I would like to use the server/filebrowser for the user to select an image.
but i am unsure how to get the results of what image/doc the user selected back in my plugin.
so, in my dialog.js contents: i added
{
type : 'button',
id : 'browse',
hidden : 'true',
filebrowser : 'info:url',
label : 'Browser Server'
}and when i click the browser server (which is ckfinder) , it opens OK
My questions i do not understand where the info goes when the user selects the image in the browser.
I found this code somewhere else, but it messed up all my other plugings.
editor._.filebrowserFn = CKEDITOR.tools.addFunction( function (fileUrl, data)
{
var dialog = this._.filebrowserSe.getDialog(),
targetInput = this._.filebrowserSe[ 'for' ],
onSelect = this._.filebrowserSe.filebrowser.onSelect;
if ( targetInput )
dialog.getContentElement( targetInput[ 0 ], targetInput[ 1 ] ).reset();
if ( typeof data == 'function' && data.call( this._.filebrowserSe ) === false )
return;
if ( onSelect && onSelect.call( this._.filebrowserSe, fileUrl, data ) === false )
return;
// The "data" argument may be used to pass the error message to the editor.
if ( typeof data == 'string' && data )
alert( data );
if ( fileUrl )
updateTargetElement( fileUrl, this._.filebrowserSe );
},
editor );
editor.on( 'destroy', function () { alert('foo1'); CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } );Thanks for any help
Randy
