Class Index | File Index

Classes


Namespace content-studio

The content-studio namespace provides an object which provides a lot of features directly connected to running inside an instance of Content Studio. The content-studio instance instance itself is an EventEmitter which emits events when editors are opened and focused, and you can tell Content Studio to open side panels and even editors.

Namespace Summary
Constructor Attributes Constructor Name and Description
<inner>  
The 'content-studio' namespace
Method Summary
Method Attributes Method Name and Description
<static>  
content-studio.browse(uri)
Opens a stand-alone browser window with the specified URI.
<static>  
content-studio.createPanel(uri, name, shortcut, iconURI)
Create a panel in Content Studio with the given uri.
<static>  
content-studio.createTab(uri, name, iconURI)
Creates a pinned tab in Content Studio with the given URI, tooltip and icon.
<static>  
content-studio.disableDrop(mimeType)
Disables drop support for a specified mimeType in Content Studio (previously enabled using enableDrop).
<static>  
content-studio.enableDrop(mimeType)
Enables drop support for a specified mimeType in Content Studio.
<static>  
content-studio.openEditor(uri)
Open or focus the editor identified by the given uri.
<static>  
content-studio.openPanel(uri)
Opens the panel in Content Studio with the given uri
<static>  
content-studio.removePanel(uri)
Remove the panel from Content Studio with the given uri.
<static>  
content-studio.removeTab(uri)
Removes the pinned tab for the given URI.
<static>  
content-studio.requestCloseEditor(uri)
Request to close the editor identified by the given uri, if it exists.
<static>  
content-studio.showTab(uri)
Shows the pinned tab for the given URI.
Event Summary
Event Attributes Event Name and Description
<static>  
content-studio.drop-listen(dropcontrol)
This event is fired whenever an object of a supported MIME type is dropped in Content Studio.
<static>  
content-studio.editor-active(editor)
The editor-active event is fired whenever a content editor has been brought up to the front.
<static>  
content-studio.editor-inactive(editor)
The editor-inactive event is fired whenever a content editor that used to be the "active" editor is replaced.
<static>  
content-studio.panel-destroy(panel)
The panel-destroy event is fired whenever a panel is destroyed.
<static>  
content-studio.panel-hide(panel)
The panel-hide event is fired whenever a panel has been hidden.
<static>  
content-studio.panel-init(panel)
The panel-init event is fired whenever a panel has been created and is about to be initialized.
<static>  
content-studio.panel-show(panel)
The panel-show event is fired whenever a panel has been shown.
<static>  
content-studio.tab-init(tab)
The tab-init event is fired whenever a pinned tab has been created.
<static>  
content-studio.tab-remove(uri)
The tab-remove event is fired whenever a pinned tab is removed.
Namespace Detail
<inner> content-studio
The 'content-studio' namespace
var CS = require("content-studio");
Method Detail
<static> content-studio.browse(uri)
Opens a stand-alone browser window with the specified URI. This actually opens up whatever browser the user has installed on his machine, e.g. Internet Explorer, Safari, Mozilla FireFox.
Parameters:
uri
The web page to open

<static> content-studio.createPanel(uri, name, shortcut, iconURI)
Create a panel in Content Studio with the given uri. A side panel will be created and associated with a URI. The URI is later used in events, to recognise the "initialisation"

The panel will be created, and an EventEmitter will be returned which can emit the action event. This event will be fired typically whenever the user activates (double clicks) on something in the panel.

Parameters:
uri
The urn of the panel. This will be used to identify the panel.
name
The label of the panel
shortcut
The shortcut of the panel
iconURI
The uri of the panel's icon

<static> content-studio.createTab(uri, name, iconURI)
Creates a pinned tab in Content Studio with the given URI, tooltip and icon.
Parameters:
uri
the URI of the HTML page to show in the pinned tab; required.
name
The tooltip of the tab; required.
iconURI
the URI of the icon of the pinned tab; optional; must be of type jpeg or png.

<static> content-studio.disableDrop(mimeType)
Disables drop support for a specified mimeType in Content Studio (previously enabled using enableDrop). Content Studio will no longer fire a content-studio.drop-listen event when an object of the specified MIME type is dropped into the Content Studio window.
Parameters:
mimeType
The MIME type for which drop support is to be disabled.

<static> content-studio.enableDrop(mimeType)
Enables drop support for a specified mimeType in Content Studio. When an object of the specified MIME type is dropped into the Content Studio window, a content-studio.drop-listen event will be fired.
Parameters:
mimeType
The MIME type for which drop support is to be enabled.

<static> content-studio.openEditor(uri)
Open or focus the editor identified by the given uri. This will open a new editor tab, and will attempt to dereference the given URI. The URI should be on the same server as the user is currently logged in, and should use the same endpoint (i.e. exactly the same host name and port number), in order for Content Studio to correctly identify the content item.
CS.openEditor("https://example.com/webservice/content/article/123");
Parameters:
uri
The uri of the editor to open/focus

<static> content-studio.openPanel(uri)
Opens the panel in Content Studio with the given uri
Parameters:
uri
The urn of the panel

<static> content-studio.removePanel(uri)
Remove the panel from Content Studio with the given uri.
Parameters:
uri
The urn of the panel

<static> content-studio.removeTab(uri)
Removes the pinned tab for the given URI.
Parameters:
uri
the URI of the pinned tab; required.

<static> content-studio.requestCloseEditor(uri)
Request to close the editor identified by the given uri, if it exists. This may result in the user wanting to save their changes, or a close of the editor with no prompt if there were no modifications done by the user.
Parameters:
uri
The uri of the editor to close

<static> content-studio.showTab(uri)
Shows the pinned tab for the given URI.
Parameters:
uri
the URI of the pinned tab; required.
Event Detail
<static> content-studio.drop-listen(dropcontrol)
This event is fired whenever an object of a supported MIME type is dropped in Content Studio. Event handlers listening for events of this type can then retrieve information about the dropped object.

The event passes a DropControl object that provides the event handler with access to the dropped object.

Parameters:
{DropControl} dropcontrol
A DropControl object that can be used to access the dropped object.

<static> content-studio.editor-active(editor)
The editor-active event is fired whenever a content editor has been brought up to the front. It does not necessarily mean that the editor has focus, since the user might be busy in the search area, but the event does mean that the "current editor" has changed.

The event is passed with an object of type EditorControl which allows further interaction with the editor.

Parameters:
{EditorControl} editor
An EditorControl instance used to interact with the editor.

<static> content-studio.editor-inactive(editor)
The editor-inactive event is fired whenever a content editor that used to be the "active" editor is replaced. The event means that the "current editor" has changed.

The event is passed with an object of type EditorControl which allows identification of the editor.

Parameters:
{EditorControl} editor
An EditorControl instance used to identify the editor.

<static> content-studio.panel-destroy(panel)
The panel-destroy event is fired whenever a panel is destroyed.

The event is passed with an object of type PanelControl which allows identification of the panel that was destroyed.

Parameters:
{PanelControl} panel
A PanelControl instance used to identify the panel.

<static> content-studio.panel-hide(panel)
The panel-hide event is fired whenever a panel has been hidden. This can be used to stop unnecessary background tasks associated with the panel.

The event is passed with an object of type PanelControl which allows further interaction with the panel.

Parameters:
{PanelControl} panel
A PanelControl instance used to interact with the panel.

<static> content-studio.panel-init(panel)
The panel-init event is fired whenever a panel has been created and is about to be initialized. Typically only the plug-in that created the panel should continue to initialize it (by adding a user interface to the panel) but the event mechanism allows plug-ins to cooperate to share panels, if so desired.

The event is passed with an object of type PanelControl which allows further interaction with the panel.

Parameters:
{PanelControl} panel
A PanelControl instance used to interact with the panel.

<static> content-studio.panel-show(panel)
The panel-show event is fired whenever a panel has been shown. This can be used to start background tasks to refresh the contents of the panel.

The event is passed with an object of type PanelControl which allows further interaction with the panel.

Parameters:
{PanelControl} panel
A PanelControl instance used to interact with the panel.

<static> content-studio.tab-init(tab)
The tab-init event is fired whenever a pinned tab has been created.

The event is passed with an object of type TabControl which allows further interaction with the tab.

Parameters:
{TabControl} tab
A TabControl instance used to interact with the tab.

<static> content-studio.tab-remove(uri)
The tab-remove event is fired whenever a pinned tab is removed.

The event is passed with the uri of the tab which allows identification of the tab that was removed.

Parameters:
{string} uri
The uri of the tab.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Dec 18 2017 16:49:34 GMT+0100 (CET)