orion.edit.model | ||
---|---|---|
![]() |
![]() |
|
orion.edit.highlighter | orion.edit.occurrences |
An orion.edit.model
service provides listeners on changes made to the orion.textview.TextView
that powers the Orion editor.
NOTE: This section is experimental and may change in future versions.
An implementation of orion.edit.model
may define zero or more functions depending on what event types it gives in its
types attribute. For every event type in
types, the function with the name "on" + eventType
will be invoked. For example, a "ModelChanged" event type causes the the provider's "onModelChanged()" function to be invoked.
The functions are always invoked with a single parameter, event
, containing the event data that was dispatched by the TextView. The current list of supported onXXXX methods is as follows:
Implementations of orion.edit.model
must define the following attributes:
Array
An array of TextView event types that this provider is interested in. When an event of one of these types is dispatched by the TextView, this provider's corresponding function will be invoked. For example, a provider with "ModelChanged" in its types array will have its
onModelChanged function invoked whenever the TextView dispatches a ModelChanged
event.
Array
An array of
Content Type IDs that this provider is interested in listening to changes for. The provider will only be notified of events that occur when a file matching one of these content types is being edited.
See the source code of the orion-codemirror plugin.
![]() |
![]() |
![]() |
orion.edit.highlighter | orion.edit.occurrences |