Type Definitions
-
Design
-
Allowed components with metadata allowing to easily sort when in array
Rank is based on the number and position of segments that were used to find the design:
1. all available segments used => 2x max available number of segments 2. some (>=0) are used + the last one => number of segments used + max available number of segments + tiebreaker 3. any other case => number of segments used + tiebreakerFor calculating the tiebreaker, the used segments are represented by a binary mask, putting the most specific
(having bigger index), on the most significant places. Then, the mask is normalized to be in the (0, 1) range.Example: available segments => [0,1,2,3,4,5,6], segments used => [0,4,5]
the main rank is 3 (#4 => number of segments used)
tie breaker [0,4,5] => (0b)0110001 => 49;
max number of segments => 7 so (2^7) 128 used to normalize
49 / 128 => 0.3828125 will be the tie breaker
so the final rank => 3.3828125Type:
- Object
- Source:
- util/designResolver.js
Properties:
Name Type Description nodeContentstring | Array.<string> content of the node from the designs
segmentsArray.<number> indexes of segments used to find the design
ranknumber ranking as described above
-
EditorConfig
-
Represents an Editor Configuration object
Type:
- Object
- Source:
- editor.js
Properties:
Name Type Argument Default Description namestring Name of the Editor
layerManagerGranite.author.LayerManager <optional>
Granite.author.LayerManager The constructor of the Layer Manager for the Editor
layersArray.<Granite.author.Layer> <optional>
[Granite.author.edit.Layer, Granite.author.PreviewLayer] The list the different Layer constructors
loadersArray.<function()> <optional>
[Granite.author.loadPageInfo, Granite.author.loadPageDesign, Granite.author.loadComponents, Granite.author.loadEditablesAsync] The list of the different "loaders"
dropControllersArray.<object> <optional>
[Granite.author.ui.ComponentDragAndDrop, Granite.author.ui.assetFinder.AssetDragAndDrop, Granite.author.ui.EditableDragAndDrop] The list of drop controllers
tourUrlstring <optional>
"/libs/wcm/core/content/editor/tour/content.html" Relative url from where to load the content of the tour
toolbarActionOrderArray.<string> A list defining the order of the actions in the Component Toolbar
assetTypeOrderArray.<string> A list defining the order of the asset types in the Asset Finder
-
InteractionConfig
-
Type:
- object
- Source:
- selection.js
Properties:
Name Type Description onOverlayHoverfunction The handler that gets executed when an overlay is hovered
onOverlayClickfunction The handler that gets executed when an overlay is clicked
onOverlayFastDblClickfunction The handler that gets executed when an overlay is fastly double clicked
onOverlaySlowDblClickfunction The handler that gets executed when an overlay is slowly double clicked
onOutsideOverlayClickfunction The handler that gets executed when a click outside of any overlay occurs
ignoreGroupSelectionboolean Should the group selection be ignored
-
LayerConfig
-
Represents a Layer Configuration object
Type:
- Object
- Source:
- layers/Layer.js
Properties:
Name Type Argument Description namestring The name identifier of the Layer.
titlestring The displayed title of the Layer.
iconstring <optional>
The value of the icon that represents the Layer in the Layer selector.
overlayConstructorGranite.author.ui.Overlay <optional>
toolbarConstructorGranite.author.ui.Toolbar <optional>
editableConstructorGranite.author.Editable <optional>
The constructor for the Editables.
editableActionsObject <optional>
The configuration object for the low-level Granite.author.ui.EditableActions on Editables.
toolbarActionsObject <optional>
The configuration object for the high-level Granite.author.ui.ToolbarActions on Editables.
sidePanelObject <optional>
The SidePanel configuration object.
Properties
Name Type Argument Description setUpfunction <optional>
The function that sets up the SidePanel.
tearDownfunction <optional>
The function that tears down the SidePanel .
findEditablesfunction <optional>
The function used to provide a list of Editables. If not provided, the ContentFrame will use the default function.
interactionsInteractionConfig <optional>
The configuration object describing interactions with Overlays.
iconClassstring <optional>
The class of the icon that represents the Layer in the Layer selector. (Deprecated since 6.3)
-
LayerManagerConfig
-
Represent a LayerManager Configuration object
Type:
- object
- Source:
- layers/LayerManager.js
Properties:
Name Type Argument Description layerOrderArray.<string> <optional>
Order in which the layers should be displayed
getDefaultLayerfunction <optional>
Should return the name of the Layer to activate. Will be called when Granite.author.LayerManager is initializing.