I am using ckeditor , and I have added 1 dialog where on button click i want to check whether cursor is inside table in ckeditor dialog ?
this is dialog code where on click of button i need to check the above condition
CKEDITOR.dialog.add( 'NDFSRSDialog', function( editor ) {
return {
title: 'Formula Editor',
contents: [
{
id: 'tab-basic',
label: 'Basic condition',
elements: [
{
type: 'text',
id: 'NDFSRS',
label: 'FIELD',
validate: CKEDITOR.dialog.validate.notEmpty( " field cannot be empty" )
},
{
type: 'button',
id: 'title',
label: 'CONDITION',
validate: CKEDITOR.dialog.validate.notEmpty( " field cannot be empty" ),
onclick : function( )
{
alert(0);
}
}
]
}
],
onOk: function() {
var dialog = this;
dialog.getElement('tab-basic', 'NDFSRS' ).hide();
}
};
});