Display Controllers - Using a DIV

Display Controllers - Using a DIV

charbl68charbl68 Posts: 2Questions: 0Answers: 0
edited September 2012 in Editor
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?

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi,

    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
This discussion has been closed.