I couldn't figure this one out. Maybe you can?
I have a dialog.UIElement of type 'html'. I use it with Ajax calls to update a div container (innerHTML). The innerHTML gets updated with tags containing 'onclick' events that needs access to the functions within the dialog plugin.
In short: How can I call the fMyFunction() within the 'html' element using the code below?
I have a dialog.UIElement of type 'html'. I use it with Ajax calls to update a div container (innerHTML). The innerHTML gets updated with tags containing 'onclick' events that needs access to the functions within the dialog plugin.
In short: How can I call the fMyFunction() within the 'html' element using the code below?
CKEDITOR.dialog.add( 'myPlugin', function( editor )
{
var fMyFunction= function(someVariable){
console.log(someVariable);
};
return {
title : 'My Plugin',
minWidth : 300,
minHeight : 60,
onOk : function()
{
...
},
onShow : function()
{
...
},
contents :
[{
id : 'general',
elements :
[
{
type:'html',
html:'<div onclick="fMyFunction('what is the scope?');"></div>'
}
]
}]
};
} );
