orion.edit.occurrences | ||
---|---|---|
![]() |
![]() |
|
orion.edit.model | orion.edit.outliner |
The orion.edit.occurrences
service allows plugins to compute identifier occurrences for specific
content types.
Implementations of orion.edit.occurrences
must define the following function:
orion.edit.EditorContext
object that contains all of the information about the current editor.
Implementations of orion.edit.occurrences
may define the following attributes:
Array
An array of
Content Type IDs for which this occurrence computer is valid.
String
A string to create a regular expression to determine if this occurrence service applies to the current context. This attribute has been deprecated in favor of contentType
.
The following example is how Orion plugs in occurrence support for JavaScript:
var provider = new orion.PluginProvider(); provider.registerService('orion.edit.occurrences', { computeOccurrences: function(editorContext, context) { return []; } { contentType: ["application/javascript"] }); provider.connect();
![]() |
![]() |
![]() |
orion.edit.model | orion.edit.outliner |