Help
ItemEditor
This component shows the editor for a course item or activity. This is the component that is shown when an author opens an item from the Syllabus component. It is also the component that is shown when the editItem method is called on the Frame API.
Preview
Properties
ParameterTypeMeaning
EnrollmentIdStringID of the enrollment for which to edit the item. This should be an author enrollment. The enrollment implies a user, course and section.
ItemIdStringID of the item to edit. This parameter is not required if the Act parameter is set to new. If the parameter is omitted in this case, a random ID is used. If the parameter is supplied for a new item, it should be restricted to digits (0-9), letters (A-Z), and underscores.
ParentItemIdStringID of the parent item for a new item. This is ignored unless the Act parameter is set to new.
GroupIdStringID of the group to initially show. If the parameter is omitted, the "All Groups", or course settings are edited. If the ShowOnlyProperties parameter is set, this is the only group that will be available for edit.
ShowSaveBooleanSpecify true for the component to show the "Save" button; specify false to hide the button. Default is true.

If you hide the button, ensure that code exists that calls the saveComponent method to save progress.
ShowCancelBooleanSpecify true for the component to show the "Cancel" button; specify false to hide the button. Default is true.
ShowOnlyContentBooleanSpecify true for the component to show only the content area of the editor. This includes the Title, Abbreviation, Description, and Attachments fields.
ShowOnlyPropertiesBooleanSpecify true for the component to show only the properties panel of the editor.
ShowHistoryBooleanSpecify true for the component to show the "History" button; specify false to hide the button. Default is true.
ActString Action to perform.
Possible values:
  • [empty] (Default)Edit an existing item
  • newCreate a new item. The Type and ParentItemId parameters must also be set.
TypeIntNumber value of the ItemType of the new item to create. This is ignored unless the Act parameter is set to new.
Events
To listen to events, call addListener on the Frame API.
EventDescription
componentcancelledFires when the editor component is cancelled. ShowCancel must be true for this event to fire.
componentsavedFired when an item is saved. Supplies an itemId property on the state object whose value is the ID of the saved item.
See Also
Syllabus ItemHtmlEditor Frame API editItem saveComponent componentsaved componentcancelled