Display Controllers - Using a DIV
Display Controllers - Using a DIV
I want to use an existing DIV on the page to display the Editor contents ... .how do I setup a Display Controller to use the existing DIV? I looked at the tutorial but it used the inline edit and referenced the tutorial from Datatables. I just want to use the existing DIV to dump the contents of the form. Can I do that?
This discussion has been closed.
Replies
Absolutely you can use an existing element. The way it works is that Editor will give you an element that contains the form controls, labels etc that it needs to put into the DOM, and you can put that wherever you want :-). If that's into a new element, fine. Or an existing one - equally no problem.
You'd do something like this in your `open' method:
[code]
"open": function ( dte, append, callback ) {
$('#myExisitingElement').append( append );
if ( callback ) {
callback();
}
}
[/code]
Regards,
Allan