AlloyEditor Class
src/ui/react/src/adapter/main.js:4
AlloyEditor static object.
Index
Methods
- editable static
- getBasePath static
- getUrl static
- implementEventTarget static
- loadLanguageResources static
Properties
- Buttons static
- regexBasePath static
- Toolbars static
Events
Methods
editable
-
node
-
config
Creates an instance of AlloyEditor.
Parameters:
-
node
String | NodeThe Node ID or HTMl node, which AlloyEditor should use as an editable area.
-
config
ObjectConfiguration attributes for the current instance of AlloyEditor.
Returns:
An instance of Core
getBasePath
()
String
static
The full URL for the AlloyEditor installation directory.
It is possible to manually provide the base path by setting a
global variable named ALLOYEDITOR_BASEPATH
. This global variable
must be set before the editor script loading.
Returns:
The found base path
getUrl
-
resource
Gets the full URL for AlloyEditor resources. By default, URLs returned by this function contain a querystring parameter ("t") set to the {@link CKEDITOR#timestamp} value.
Parameters:
-
resource
StringThe resource whose full URL we want to get. It may be a full, absolute, or relative URL.
Returns:
The full URL.
implementEventTarget
()
static
Implements event firing and subscribing via CKEDITOR.event.
loadLanguageResources
-
callback
Detects and load the corresponding language file if AlloyEditor language strings are not already present. The function fires a languageResourcesLoaded event
Parameters:
-
callback
FunctionOptional callback to be called when AlloyEditor loads the language resource.
Properties
Buttons
Object
static
And object, containing all currently registered buttons in AlloyEditor.
regexBasePath
RegExp
static
Regular expression which should match the script which have been used to load AlloyEditor.
Toolbars
Object
static
And object, containing all currently registered toolbars in AlloyEditor.
Events
languageResourcesLoaded
Fired when AlloyEditor detects the browser language and loads the corresponding language file. Once this event is fired, AlloyEditor.Strings will be populated with data.