Contains the EditorToolbar, EditorTabs, and Editors
Extends
- dijit/_WidgetBase
- dijit/_TemplatedMixin
- dijit/_WidgetsInTemplateMixin
- dojo/Evented
Requires
- module:explorer/widgets/editorarea/EditorToolbar
- module:explorer/widgets/editorarea/EditorTabs
- module:explorer/widgets/editorarea/GadgetEditor
- module:explorer/widgets/editorarea/HtmlEditor
- module:explorer/widgets/editorarea/CssEditor
- module:explorer/widgets/editorarea/JSEditor
- module:explorer/widgets/editorarea/JSONEditor
- module:explorer/widgets/editorarea/EditorTab
- module:explorer/gadget-spec-service
Methods
-
addToUi(data)
-
Adds a spec's tabs to the Ui and adjusts the render button according to the type of spec.
Parameters:
Name Type Description dataObject Data of the spec. - Source:
-
createTab(resource, editorTabs, isActive, editor)
-
Creates an EditorTab of a spec.
Parameters:
Name Type Description resourceObject An object that contains data about a spec's particular resource (e.g. jsResource). editorTabsEditorTabs Contains each EditorTab of the spec. isActiveBoolean Whether or not the tab is the focused tab. editorGadgetEditor the Editor corresponding to the tab's resource (e.g. JSEditor). - Source:
-
createTabsAndEditors(data, editorTabs)
-
Creates the necessary EditorTabs and Editors for a spec.
Parameters:
Name Type Description dataObject Data of the spec. editorTabsEditorTabs Contains each EditorTab of the spec. - Source:
-
destroy()
-
Destroys this instance of EditorArea.
- Source:
-
displaySpec(id)
-
Displays the spec's code - resets the tabs and adds the necessary tabs and editors to the Ui.
Parameters:
Name Type Description idString The ID of the spec to display - Source:
-
getContextRoot() → {String}
-
Gets the context root.
- Source:
Returns:
The context root.- Type
- String
-
getEditorTabs() → {EditorTabs}
-
Getter method for EditorTabs.
- Source:
Returns:
The EditorTabs object.- Type
- EditorTabs
-
getGadgetSpec() → {Object}
-
Gets the GadgetSpec object.
- Source:
Returns:
The GadgetSpec object.- Type
- Object
-
getGadgetSpecService() → {gadgetSpecService}
-
Getter method for the GadgetSpecService module for testing purposes.
- Source:
Returns:
The gadgetSpecService object.- Type
- gadgetSpecService
-
postGadgetSpec(thenFunction)
-
Posts a spec to the servlet. This method is used when rerendering a spec.
Parameters:
Name Type Description thenFunctionFunction Callback function to execute if the POST to the servlet is successful. - Source:
-
setTitle(title)
-
Sets the title of a spec in the Ui.
Parameters:
Name Type Description titleString Title of the spec. - Source:
-
startup()
-
Called right after widget is added to the dom. See link for more information.
- Source:
- See: