Namespace: author

Granite. author

Granite author namespace contains all scripts and object for the Authoring Editor

Contains members of the editor; entry point of the Core Authoring Editor functionalities

Source:
declaration.js

Classes

Component
Editable
Inspectable
Layer
LayerManager
PageInfoHelper
PreviewLayer
ScaffoldingLayer

Namespaces

components
ContentFrame
design
developer
DialogFrame
edit
editableHelper
editables
EditorFrame
overlayManager
OverlayWrapper
pageDesign
pageInfo
responsive
selection
ui

Members


<static> ns.pageInfoHelper :Granite.author.PageInfoHelper

Instantiated page info helper providing utilitary functions to read the pageInfo object

Type:
Source:
storage/pageInfo.js

Methods


getPageDesignLocation()

Returns the relative URL location of the page design

Source:
editor.js

getPageInfoLocation()

Returns the resource location where to get the page info from

Source:
editor.js

init(config, useApplyDefaults)

Initializes and starts the Editor with the given config.
Editors that are extending the Core Editor should use this method to configure and "start" their specific Editor.

Will mostly instantiate the Granite.author.LayerManager with the passed list Layers, register the different Granite.author.ui.dropControllers and initialize the Granite.author.ContentFrame and Granite.author.EditorFrame modules.

It will also listen to the Document#event:cq-content-frame-loaded event to trigger the different "loaders" (Granite.author.loadComponents, Granite.author.loadPageInfo, Granite.author.loadPageDesign, Granite.author.ContentFrame.loadEditablesAsync) passed to finally broadcast a Document#event:cq-editor-loaded event.

The remaining modules will then be initialized on Document#event:cq-editor-loaded once the different data stores and core modules are ready.

Parameters:
Name Type Description
config EditorConfig

Configuration object

useApplyDefaults boolean

true to use Granite.Util.applyDefaults to merge config and default config; false/undefined to use $.extend

Source:
editor.js

loadComponents()

Loads all components that could be used on the page

This function uses the component servlet specified by the current page info object (or uses the default components provider)

Source:
editor.js
See:
Fires:
Returns:

An array of all components (not filtered) to be used on the page

Type
$.Promise

loadPageDesign()

Loads the design object from the design path provided by the page info object

Relies on the existence of the pageInfo

Source:
editor.js
See:
Fires:
Returns:

The design info JSON object corresponding of the current page info object

Type
$.Promise

loadPageInfo(cache)

Loads the page info object from the server corresponding to the current ContentFrame location

Parameters:
Name Type Description
cache boolean

Should the page info be fetched from the cache

Source:
editor.js
See:
Fires:
Returns:

The page info JSON object corresponding to the current ContentFrame location

Type
$.Promise