DOM structure
When considering the styling of Editor, it is important to understand the HTML structure that Editor uses to display its various components. Like the rest of Editor, the HTML that it uses is highly modularised with elements being reused for the various display options Editor presents. This page documents the HTML structure used for each component so you can provide styling information to have Editor match the look and feel that you required.
Primary elements
The primary elements in Editor are those which are reused as part of various display options.
Fields
Each field in the form has the following structure:
<div class="DTE_Field DTE_Field_Type_{TYPE} DTE_Field_Name_{NAME} ">
<label class="DTE_Label" for="DTE_Field_{NAME}">
TEXT-LABEL
<div class="DTE_Label_Info">
TEXT-LABEL-INFO
</div>
</label>
<div class="DTE_Field_Input">
<div class="DTE_Field_InputControl"
<input id="DTE_Field_{NAME}" type="text">
</div>
<div class="multi-value">
MULTI-TITLE
<span class="multi-info">
MULTI-INFO
</span>
</div>
<div class="multi-restore">
MULTI-RESTORE
</div>
<div class="DTE_Field_Error">
TEXT-FIELD-ERROR
</div>
<div class="DTE_Field_Message">
TEXT-FIELD-MESSAGE
</div>
<div class="DTE_Field_Info">
TEXT-FIELD-INFO
</div>
</div>
</div>
Where:
TYPEis the field type (fields.type). This provides the ability to CSS style fields of a specific typeNAMEis the field name (fields.name)TEXT-LABELis field label (fields.label)TEXT-FIELD-ERRORis field error message (error())TEXT-FIELD-MESSAGEis the field general information message (message())TEXT-FIELD-INFOis the field information outline (fields.fieldInfo)MULTI-TITLEis the multi-value label (i18n.multi.title)MULTI-INFOis the multi-value detailed information text (i18n.multi.info) - only the first of these in the form will be shownMULTI-RESTOREis the multi-value restore button text (i18n.multi.restore).- Note that only one of the
div.multi-valueanddiv.multi-restoreelements will be shown at a time. Neither will be shown if the form is not multi-row editing. - Additionally, this two multi-row DOM information elements are present in Editor 1.5+ only.
- Note that only one of the
Form
The Editor form has the following structure which is used in both the main and bubble editing options:
<form>
<div class="DTE_Form_Content">
FIELDS
</div>
</form>
Where:
FIELDSare the fields defined above.
Header
The form title is optionally used by the main and bubble editing displays to provide summary information to the end user and has the following structure:
<div class="DTE_Header">
<div class="DTE_Header_Content">
TEXT-TITLE
</div>
</div>
Where:
TEXT-TITLEis the form title text set bytitle()
Buttons
The buttons that Editor can show (buttons()) have the following structure:
<div class="DTE_Form_Buttons">
<button>
TEXT-BUTTON
</button>
...
</div>
Where:
TEXT-BUTTONis the button text as defined by thelabeloption of thebutton-optionsobject....is the repeatingbuttonelements, if more than one button element is defined.
Message
The form message can provide a general overview message about the form to the end user and has the following structure:
<div class="DTE_Form_Info">
TEXT-MESSAGE
</div>
Where:
TEXT-MESSAGEis the message text set bymessage()
Error
<div class="DTE_Form_Error">
TEXT-ERROR
</div>
Where:
TEXT-ERRORis the message text set byerror()
Editing
Editor's three editing modes each have different markup that they use for display of the form, with the primary parts (as defined above) reused between the display options.
Main
The main editing form (create(), edit() and remove()) is used to show all of the fields in the form, and has the following structure:
<div class="DTE DTE_Action_Create">
HEADER
<div class="DTE_Processing_Indicator"></div>
<div class="DTE_Body">
<div class="DTE_Body_Content">
MESSAGE
FORM
</div>
</div>
<div class="DTE_Footer">
<div class="DTE_Footer_Content"></div>
ERROR
BUTTONS
</div>
</div>
Where:
HEADERis the form header, as defined aboveMESSAGEis the form general message, as defined aboveFORMis the form itself, as defined aboveERRORis the form error message, as defined aboveBUTTONSis the form button collection, as defined above
Bubble
Bubble editing provides a fast editing for one or more fields in a table. The bubble element is positioned above the elements that were used to activate the edit and has the following structure:
<div class="DTE DTE_Bubble">
<div class="DTE_Bubble_Liner" style="left: 0px;">
HEADER
MESSAGE
<div class="DTE_Bubble_Table">
FORM
<div class="DTE_Bubble_Close"></div>
BUTTONS
</div>
ERROR
</div>
<div class="DTE_Bubble_Triangle"></div>
</div>
Where:
HEADERis the form header, as defined aboveMESSAGEis the form general message, as defined aboveFORMis the form itself, as defined aboveERRORis the form error message, as defined aboveBUTTONSis the form button collection, as defined above
Bubble background
When bubble editing is shown, an additional element is also added to the document (attached to body) which is used to providing shading behind the bubble editing display through CSS. It has the structure:
<div class="DTE_Bubble_Background"></div>
Inline
Inline editing provides a fast editing for a single field, inserting the field input into the table directly. The HTML inserted into the cell has the following structure:
<div class="DTE DTE_Inline">
<div class="DTE_Inline_Field">
FIELD
</div>
<div class="DTE_Inline_Buttons">
BUTTONS
</div>
</div>
Where:
FIELDis the field to be edited, as defined aboveBUTTONSis the form button collection, as defined above
Display controllers
Editor has two built in display controllers, which are used to present the form to the end user in different ways. Typically you would want to just use the default CSS for these display controllers, although it can be useful to tweak the styling for your use case.
Lightbox
The lightbox display controller displays the form as a box floating above the page. It does this with the following DOM structure:
<div class="DTED_Lightbox_Wrapper">
<div class="DTED_Lightbox_Container">
<div class="DTED_Lightbox_Content_Wrapper">
<div class="DTED_Lightbox_Content">
MAIN
<div class="DTED_Lightbox_Close"></div>
</div>
</div>
</div>
</div>
Where:
MAINis main editing form, as defined above
Lightbox background
The lightbox display controller will also add a background element to the document (attached to body) which is used to providing shading behind the lightbox display through CSS. It has the structure:
<div class="DTED_Lightbox_Background"></div>
Envelope
The envelope display controller shows the editing form as attached to another element in the page - typically the row being edited or the table header. It has the following structure:
<div class="DTED_Envelope_Wrapper">
<div class="DTED_Envelope_ShadowLeft"></div>
<div class="DTED_Envelope_ShadowRight"></div>
<div class="DTED_Envelope_Container">
MAIN
<div class="DTED_Envelope_Close">×</div>
</div>
</div>
Where:
MAINis main editing form, as defined above
Envelope background
The envelope display controller will also add a background element to the document (attached to body) which is used to providing shading behind the envelope display through CSS. It has the structure:
<div class="DTED_Envelope_Background"></div>