dw.experience
Class CustomEditor
Object
dw.experience.CustomEditor
 ======================
 PAGE DESIGNER BETA API
 ======================
 
This class represents a custom editor for component attributes of type custom. It is instantiated by Page Designer and is subsequently used there for editing of such attributes by the merchant in a visual manner. It therefore serves the Page Designer with all information required by such UI. What exactly this information will be is up to the developer of the respective custom editor UI, i.e. depends on the respective json and js files written for both the attribute definition as well as the custom editor type. Currently a configuration can be served (basically values passed to Page Designer so that it can bootstrap the custom editor UI on the client side). Furthermore resources can be served, which are URLs to scripts and styles required by the same UI (you will likely require your own Javascript and CSS there).

You can access the aforementioned configuration as provided through the editor definition of the respective attribute definition, which you can also adjust in the init function (see corresponding js file of your custom editor type) that is called during initialization of the custom editor, i.e. right before it is passed to the Page Designer UI. The same applies for the script and style resources which you specified as part of your custom editor type and which you can refine with the init function as needed.

Properties
configuration  :  Map  (Read Only)
The configuration of the custom editor. This is initialized with the values as provided through the editor definition of the respective attribute definition of type custom. Be aware that this configuration will have to be serializable to JSON itself as it will be passed to Page Designer for processing in the UI. So you must not add any values in this map that are not properly serializable. In order to add structured information refrain from using curly braces JS object notation but use HashMap for key value pairs. Using arrays for lists is also perfectly fine. The same applies for simple values like strings and numbers. Do not use complex DWScript classes that do not support JSON serialization like for instance Product.
resources  :  CustomEditorResources  (Read Only)
The resources of the custom editor. This is initialized with the values as specified by the custom editor type json (see the respective styles and scripts section).
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getConfiguration() : Map
Returns the configuration of the custom editor.
getResources() : CustomEditorResources
Returns the resources of the custom editor.
Methods inherited from class Object
Method Detail
getConfiguration
getConfiguration() : Map
Returns the configuration of the custom editor. This is initialized with the values as provided through the editor definition of the respective attribute definition of type custom. Be aware that this configuration will have to be serializable to JSON itself as it will be passed to Page Designer for processing in the UI. So you must not add any values in this map that are not properly serializable. In order to add structured information refrain from using curly braces JS object notation but use HashMap for key value pairs. Using arrays for lists is also perfectly fine. The same applies for simple values like strings and numbers. Do not use complex DWScript classes that do not support JSON serialization like for instance Product.
Returns:
the configuration of the custom editor

getResources
getResources() : CustomEditorResources
Returns the resources of the custom editor. This is initialized with the values as specified by the custom editor type json (see the respective styles and scripts section).
Returns:
the custom editor resources, will never be null