I write a plugin for replacing forms select with a fakeelement, because select is not editable. Now I have to set the values for dialog. This is what I have:
I get the error getOptions is not defined
getOptions is a function in the original dialog file. How can I use this function in my plugin? I could copy all functions I need, but I think that makes no sense.
if ( dialogName == 'select' )
{
dialogDefinition.onShow = function()
{
var selection = editor.getSelection(),
element = selection.getSelectedElement();
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'selectfield' )
{
this.selectBox = element;
element = editor.restoreRealElement( this.selectBox );
this.setupContent( 'select', element );
var objOptions = getOptions( element );
for ( var i = 0 ; i < objOptions.count() ; i++ )
this.setupContent( 'option', objOptions.getItem( i ) );
selection.selectElement( this.selectBox );
}
};
}I get the error getOptions is not defined
getOptions is a function in the original dialog file. How can I use this function in my plugin? I could copy all functions I need, but I think that makes no sense.

Re: Call function from dialog file
Re: Call function from dialog file
For those things it should be possible to call CKEDITOR.dialog.getFunction().getOptions...
Re: Call function from dialog file
funtion f1() { function f2() { } }f1.f2()