Class WysiwygEditor
- java.lang.Object
-
- com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer<java.lang.String>
-
- com.hybris.cockpitng.editor.wysiwyg.WysiwygEditor
-
- All Implemented Interfaces:
CockpitEditorRenderer<java.lang.String>
public class WysiwygEditor extends AbstractCockpitEditorRenderer<java.lang.String>
WYSIWYG editor usingCKeditorcomponent.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_PARAM_PATH-
Fields inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENT, YW_EDITOR_AREA_LABEL_CONTAINER
-
Fields inherited from interface com.hybris.cockpitng.editors.CockpitEditorRenderer
INITIAL_EDIT_STRING
-
-
Constructor Summary
Constructors Constructor Description WysiwygEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CockpitPropertiesgetCockpitProperties()protected java.lang.StringgetCustomToolbarConfig(EditorContext<java.lang.String> context)Resolves custom toolbar configuration based on custom-attribute 'toolbar' specified for given editor instance.protected java.lang.StringgetDefaultJsConfigURI(EditorContext<java.lang.String> context)Resolves default configuration js file URI based on the cockpit property specified as 'defaultJsConfig' editor setting in the editor definition.ObjectValueServicegetObjectValueService()protected voidinitAdditionalParameters(org.zkforge.ckez.CKeditor editorView, EditorContext<java.lang.String> context)protected booleanisBase64EncodingEnabled(EditorContext<java.lang.String> context)protected voidonChangeEvent(EditorContext<java.lang.String> context, EditorListener<java.lang.String> listener, org.zkforge.ckez.CKeditor cKeditor)voidrender(org.zkoss.zk.ui.Component parent, EditorContext<java.lang.String> context, EditorListener<java.lang.String> listener)Creates a new editor component and attaches it to the specifiedComponentcomponent.-
Methods inherited from class com.hybris.cockpitng.editors.impl.AbstractCockpitEditorRenderer
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecorator
-
-
-
-
Field Detail
-
CONFIG_PARAM_PATH
public static final java.lang.String CONFIG_PARAM_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
render
public void render(org.zkoss.zk.ui.Component parent, EditorContext<java.lang.String> context, EditorListener<java.lang.String> listener)Description copied from interface:CockpitEditorRendererCreates a new editor component and attaches it to the specifiedComponentcomponent.- Parameters:
parent- parent component the editor should be attached tocontext- the context for the editor creationlistener- the listener to notify the rest of the world about value changes and other events
-
initAdditionalParameters
protected void initAdditionalParameters(org.zkforge.ckez.CKeditor editorView, EditorContext<java.lang.String> context)
-
isBase64EncodingEnabled
protected boolean isBase64EncodingEnabled(EditorContext<java.lang.String> context)
-
getDefaultJsConfigURI
protected java.lang.String getDefaultJsConfigURI(EditorContext<java.lang.String> context)
Resolves default configuration js file URI based on the cockpit property specified as 'defaultJsConfig' editor setting in the editor definition.- Parameters:
context- editor context- Returns:
- file URI defined as cockpit property key 'defaultJsConfig' or empty string of no default configuration was specified for wysiwyg editor.
-
getCustomToolbarConfig
protected java.lang.String getCustomToolbarConfig(EditorContext<java.lang.String> context)
Resolves custom toolbar configuration based on custom-attribute 'toolbar' specified for given editor instance.- Parameters:
context- editor context- Returns:
- file URI defined as 'customJsConfig' attribute or empty string if no custom config was specified.
-
onChangeEvent
protected void onChangeEvent(EditorContext<java.lang.String> context, EditorListener<java.lang.String> listener, org.zkforge.ckez.CKeditor cKeditor)
-
getCockpitProperties
public CockpitProperties getCockpitProperties()
-
getObjectValueService
public ObjectValueService getObjectValueService()
-
-