# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

# oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlRichTextCKEditorPeer

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    org.ecmascript.object.Object
       |
       +--oracle.adf.view.js.base.AdfObject
             |
             +--oracle.adf.view.js.base.AdfUIPeer
                   |
                   +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
                         |
                         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer
                               |
                               +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
                                     |
                                     +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlRichTextEditorBasePeer
                                           |
                                           +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlRichTextCKEditorPeer

    public class AdfDhtmlRichTextCKEditorPeer
    extends AdfDhtmlRichTextEditorBasePeer

Peer for the richTextEditor component which is based on CKEditor.

## Field Summary
`protected static Object` | `InitConstants`
`private Object` | `_isDirty`
`private Object` | `_isTouch`

### Fields inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
`ComponentLabelChanged, ComponentShowRequiredChanged`

### Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, CreateSubId, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS, SELECTED_STYLECLASS`

### Fields inherited from oracle.adf.view.js.base.AdfObject
`constructor, superclass`

### Fields inherited from org.ecmascript.object.Object
`prototype`

## Constructor Summary
`public` | `AdfDhtmlRichTextCKEditorPeer()` Peer for the richTextEditor component which is based on CKEditor.

## Method Summary
`private Object` | `_addCustomOrExtra(Object item, Object domDocument, Object customPrefix)` This method adds placeholder in toolbar for custom facets & for buttons coming from extra plugins.
`private Object` | `_addToolbarPlaceHolder(Object editorObj)` Creates placeholder button in CKEditor toolbar for each custom toolbar facet.
`private Object` | `_blurCallback(Object evt)` Callback to process blur event of ckeditor
`protected Object` | `ComponentEditModeChanged(Object component)`
`protected Object` | `DestroyEditor(Object component)`
`private Object` | `_execCommand(String key, Object value)` Executes a command on the document, selection, or the given range.
`public Object` | `focus(AdfUIComponent component)` Programmatically focuses the document.
`private Object` | `_focusCallback(Object evt)` Callback to process focus event of ckeditor
`private Object` | `_getAllToolbar()` Utility method which returns all toolbar buttons supported.
`private HTMLElement` | `_getCkInitField(Object component)` Gets the contentField (the iframe).
`private HTMLElement` | `_getContentField(Object component)` Gets the contentField (the iframe).
`public Object` | `getCurrentContent(Object component, Object domElement)` Returns content set in component
`private Object` | `_getCustomToolbars()`
`protected Object` | `GetReadyState()` Returns whether the content of the peer is available Possible return values are:
`public Object` | `getSelectionRange(Object component)` public API to get the text selection range.
`protected Object` | `GetSubmittedValue(AdfUIComponent component, HTMLElement domElement)` Returns the submittedValue by getting the value of the input dom node.
`private Object` | `_getToolbar(Object component)` Utility method to set configured toolbar
`protected Object` | `HandleCodeEditingModeChange(Object component)` Subclasses should override this method to handle UI changes w.r.t.
`private Object` | `_handleCustomToolbar(Object component, Object instanceRef)` This method moves dom element from custom toolbar and adds it to ckeditor toolbar placeholder.
`private Object` | `_handlePopupClosed(Object componentEvent)`
`private static Object` | `_hasEditorLoaded(Object component)`
`protected Object` | `Init(Object component)` Initializes the instance.
`private Object` | `_initCkEditor(Object component)` Initializes CKEditor instance.
`protected static Object` | `InitConstants()`
`private Object` | `_initData(Object component, Object data)`
`protected Object` | `InitDomElement(AdfUIComponent component, HTMLElement domElement)` Initialize the associated domElement when the peer is created.
`public static Object` | `initInline()` This method sets CKEDITOR4_BASEPATH before any resource of CKEditor is initiated.
`protected static Object` | `InitSubclass()`
`private Object` | `_instanceReady(Object component, Object instanceRef)` Callback method invoked when CKEditor instance is loaded.
`private static Object` | `_isEditorLoading(Object component)`
`private Object` | `_modeCallback(Object evt)` Callback to process mode change event of ckeditor
`private static Object` | `_needsEditorReload(Object component)`
`private Object` | `_pasteCallback(Object pasteEvent)` Callback to process the paste event of ckeditor, checks if there are any image content, constructs image tag and populates * * that with image content in base 64 encoded format If the content is not just image, it will not process that and leave it to normal flow.
`private Object` | `_redistributeEventsToNewTarget(Object evt)`
`private Object` | `_resizeCallback(Object evt)` Callback to process resize event of ckeditor
`private Object` | `_resizeCustomToolbars(Object component, Object instanceRef)` This method, sets max-width on custom toolgroups.
`protected Object` | `ResizeNotify(Object oldWidth, Object oldHeight, Object newWidth, Object newHeight)` Called to notify the peer of resize activity.
`protected Object` | `ScrollIntoView(Object component, Object focus, String subTargetId)` Overrriden to provide RTE specific implementation.
`public Object` | `setCodeEditingMode(Boolean newCodeEditingMode)` Specifies the new source code editing mode.
`protected Object` | `SetContentFieldValue(Object component, Object newValue)`
`private Object` | `_setFontSizeOnCK(Object component)`
`protected Object` | `UpdateValue()`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlRichTextEditorBasePeer
`addBinding, AddStyleBinding, ComponentRemoved, executeCommand, GetComponentLabel, GetInlineEditor, HandleComponentAction, HandleComponentClick, HandleComponentFocus, HandleContextChanged, isCodeEditingMode, isEmpty, needsResizeNotify, RemoveContextChangeListeners, RemoveStyleBindings, SetDisplayValue, ShowFormatHint, StopDialogsFromBeingInactivatedDueToIframes`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
`autoSubmit, BindToComponent, ComponentChanged, __componentLabelChanged, ComponentSubmittedValueChanged, disableBrowserAutoComplete, Focus, GetComponentSubmittedValue, GetComponentValue, getContentNode, GetContentNode, GetContentNodeId, getContentNodeText, GetDisplayValue, GetLabelElement, GetLabelText, getLastSubmittedValue, getMarkDirtyFlag, GetNoteWindowAlignmentHint, GetNoteWindowAlignmentNode, GetValidatorHints, HandleComponentKeyUp, HideNoteWindow, IsInitialized, IsNoteWindowVisible, __isSpuriousDirtyValue, LazyInitialize, MessageNotify, MessageShow, NeedsSpuriousDirtyValueTracking, __resetSpuriousDirtyValue, __restoreDirtyDisplayValue, setLastSubmittedValue, setMarkDirtyFlag, ShouldShowHint, ShowNoteWindow, ShowNoteWindowMouseOver, StashOldValue, StopArrowKeyBubbling, Validate, ValidateAndStashNewValue, ValidateIfStashedOldValue, VetoShowNoteWindow, WasSubmitted`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer
`ComponentValueChanged, GetBestMatchSubId, getConvertedObject, getConvertedValue, getFormatHint, GetFormattedDisplayValue, GetNullDefault, GetSubIdDomElement, setDisplayValue`

### Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, clearDragReadyState, ClearDragReadyState, clearDragSourceState, ClearDragSourceState, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, createComponentEvent, CreateComponentEvent, CreateDraggableNode, createInnerPeerClassWithSubId, createPeerClass, createSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, DispatchUncanceledComponentEvent, domReplaceNotify, DomReplaceNotify, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDomRootNodes, GetDomRootNodes, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, GetElementToReplaceWithSVG, getFallbackDomElement, GetFallbackDomElement, getFirstAncestorComponent, getInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, scrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, SimulateMouseOnDescendant, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, UpdateMessageType, visitChildren`

### Methods inherited from oracle.adf.view.js.base.AdfUIPeer
`getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible`

### Methods inherited from oracle.adf.view.js.base.AdfObject
`adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString`

## Field Detail

### InitConstants

`protected static Object InitConstants`

### _isDirty

`private Object _isDirty`

### _isTouch

`private Object _isTouch`

## Constructor Detail

### AdfDhtmlRichTextCKEditorPeer

`public AdfDhtmlRichTextCKEditorPeer()`
  Peer for the richTextEditor component which is based on CKEditor.

## Method Detail

### _addCustomOrExtra

`private Object _addCustomOrExtra(Object item,
Object domDocument,
Object customPrefix)`
  This method adds placeholder in toolbar for custom facets & for buttons coming from extra plugins. If we find dom element corresponding to facet, its custom adf facet used in toolbar. Otherwise, its button coming from extra plugins of ckeditor.
  Parameters:

    `item` |  |
    `domDocument` |  |
    `customPrefix` |  |

  Return:
    `Object`

### _addToolbarPlaceHolder

`private Object _addToolbarPlaceHolder(Object editorObj)`
  Creates placeholder button in CKEditor toolbar for each custom toolbar facet.
  Parameters:

    `editorObj` |  |

  Return:
    `Object`

### _blurCallback

`private Object _blurCallback(Object evt)`
  Callback to process blur event of ckeditor
  Parameters:

    `evt` |  |

  Return:
    `Object`

### ComponentEditModeChanged

`protected Object ComponentEditModeChanged(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### DestroyEditor

`protected Object DestroyEditor(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.DestroyEditor(Object)`

### _execCommand

`private Object _execCommand(String key,
Object value)`
  Executes a command on the document, selection, or the given range.
  Parameters:

    `key` | - | The command to execute
    `value` | - | The value of the command

  Return:
    `Object`

### focus

`public Object focus(AdfUIComponent component)`
  Programmatically focuses the document. This will only work if the component had a focus before.
  Parameters:

    `component` | - | The component

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.focus(Object)`

### _focusCallback

`private Object _focusCallback(Object evt)`
  Callback to process focus event of ckeditor
  Parameters:

    `evt` |  |

  Return:
    `Object`

### _getAllToolbar

`private Object _getAllToolbar()`
  Utility method which returns all toolbar buttons supported.
  Return:
    `Object`

### _getCkInitField

`private HTMLElement _getCkInitField(Object component)`
  Gets the contentField (the iframe).
  Parameters:

    `component` |  |

  Return:
    `HTMLElement` - the contentField

### _getContentField

`private HTMLElement _getContentField(Object component)`
  Gets the contentField (the iframe).
  Parameters:

    `component` |  |

  Return:
    `HTMLElement` - the contentField
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer._getContentField(Object)`

### getCurrentContent

`public Object getCurrentContent(Object component,
Object domElement)`
  Returns content set in component
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.getCurrentContent(Object, Object)`

### _getCustomToolbars

`private Object _getCustomToolbars()`
  Return:
    `Object`

### GetReadyState

`protected Object GetReadyState()`
  Returns whether the content of the peer is available Possible return values are:
  - `AdfUIComponent.STATE_LOADING` The UIComponent is still loading state
  - `AdfUIComponent.STATE_COMPLETE` The UIComponent is fully loaded
  Return:
    `Object`
  Overrides:
    `AdfUIPeer.getReadyState(Object)`

### getSelectionRange

`public Object getSelectionRange(Object component)`
  public API to get the text selection range.
  Parameters:

    `component` |  |

  Return:
    `Object`

### GetSubmittedValue

`protected Object GetSubmittedValue(AdfUIComponent component,
HTMLElement domElement)`
  Returns the submittedValue by getting the value of the input dom node.
  Parameters:

    `component` | - | Component that this peer will be associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object` - submittedValue
  Overrides:
    `AdfDhtmlEditableValuePeer.GetSubmittedValue(Object, Object)`

### _getToolbar

`private Object _getToolbar(Object component)`
  Utility method to set configured toolbar
  Parameters:

    `component` |  |

  Return:
    `Object`

### HandleCodeEditingModeChange

`protected Object HandleCodeEditingModeChange(Object component)`
  Subclasses should override this method to handle UI changes w.r.t. edit mode toggle.
  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.HandleCodeEditingModeChange(Object)`

### _handleCustomToolbar

`private Object _handleCustomToolbar(Object component,
Object instanceRef)`
  This method moves dom element from custom toolbar and adds it to ckeditor toolbar placeholder. Also 'cke_reset_all' causes issue to ADF styles, hence removed this style from "top" ckeditor dom and applied only for ckeditor toolbar rows.
  Parameters:

    `component` |  |
    `instanceRef` |  |

  Return:
    `Object`

### _handlePopupClosed

`private Object _handlePopupClosed(Object componentEvent)`
  Parameters:

    `componentEvent` |  |

  Return:
    `Object`

### _hasEditorLoaded

`private static Object _hasEditorLoaded(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### Init

`protected Object Init(Object component)`
  Initializes the instance. Subclasses of AdfObject must call their superclass' Init
  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfObject.Init()`

### _initCkEditor

`private Object _initCkEditor(Object component)`
  Initializes CKEditor instance. This method is called in resize notify and not in initDom. Reason - if RTE is opened in popup, reparenting happens in show which causes trouble to CKEditor. CKEditor relies on iFrame which get refreshed during reparenting. This breaks CKEditor.
  Parameters:

    `component` |  |

  Return:
    `Object`

### InitConstants

`protected static Object InitConstants()`
  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.InitConstants()`

### _initData

`private Object _initData(Object component,
Object data)`
  Parameters:

    `component` |  |
    `data` |  |

  Return:
    `Object`

### InitDomElement

`protected Object InitDomElement(AdfUIComponent component,
HTMLElement domElement)`
  Initialize the associated domElement when the peer is created. Stateless peers are not bound at the time that this method is called.
  Parameters:

    `component` | - | Component that this peer will be associated with
    `domElement` | - | Root DOM element of this peer

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)`

### initInline

`public static Object initInline()`
  This method sets CKEDITOR4_BASEPATH before any resource of CKEditor is initiated. Alsonote that this method gets invoked inline immidiately. We have renamespaced CKEDITOR to CKEDITOR4 to avoid conflicts with any app already using CK, hence all global variables are now prefixed CKEDITOR4
  Return:
    `Object`

### InitSubclass

`protected static Object InitSubclass()`
  Return:
    `Object`
  Overrides:
    `AdfDhtmlValuePeer.InitSubclass()`

### _instanceReady

`private Object _instanceReady(Object component,
Object instanceRef)`
  Callback method invoked when CKEditor instance is loaded.
  Parameters:

    `component` |  |
    `instanceRef` |  |

  Return:
    `Object`

### _isEditorLoading

`private static Object _isEditorLoading(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _modeCallback

`private Object _modeCallback(Object evt)`
  Callback to process mode change event of ckeditor
  Parameters:

    `evt` |  |

  Return:
    `Object`

### _needsEditorReload

`private static Object _needsEditorReload(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _pasteCallback

`private Object _pasteCallback(Object pasteEvent)`
  Callback to process the paste event of ckeditor, checks if there are any image content, constructs image tag and populates * * that with image content in base 64 encoded format If the content is not just image, it will not process that and leave it to normal flow.
  Parameters:

    `pasteEvent` |  |

  Return:
    `Object`

### _redistributeEventsToNewTarget

`private Object _redistributeEventsToNewTarget(Object evt)`
  Parameters:

    `evt` |  |

  Return:
    `Object`

### _resizeCallback

`private Object _resizeCallback(Object evt)`
  Callback to process resize event of ckeditor
  Parameters:

    `evt` |  |

  Return:
    `Object`

### _resizeCustomToolbars

`private Object _resizeCustomToolbars(Object component,
Object instanceRef)`
  This method, sets max-width on custom toolgroups. Value is derived from toolbar top element.
  Parameters:

    `component` |  |
    `instanceRef` |  |

  Return:
    `Object`

### ResizeNotify

`protected Object ResizeNotify(Object oldWidth,
Object oldHeight,
Object newWidth,
Object newHeight)`
  Called to notify the peer of resize activity. Only called if peer overrides needsResizeNotify() to return true.
  Parameters:

    `oldWidth` |  |
    `oldHeight` |  |
    `newWidth` |  |
    `newHeight` |  |

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.resizeNotify(Object, Object, Object, Object, Object)`

### ScrollIntoView

`protected Object ScrollIntoView(Object component,
Object focus,
String subTargetId)`
  Overrriden to provide RTE specific implementation.
  Parameters:

    `component` |  |
    `focus` |  |
    `subTargetId` | - | optional component dependent DOM sub-id that needs to be scrolled/focused into view Default value = null

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.scrollIntoView(Object, Object, String)`

### setCodeEditingMode

`public Object setCodeEditingMode(Boolean newCodeEditingMode)`
  Specifies the new source code editing mode.
  Parameters:

    `newCodeEditingMode` | - | true for code mode, and false for rich text

  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.setCodeEditingMode(Boolean)`

### SetContentFieldValue

`protected Object SetContentFieldValue(Object component,
Object newValue)`
  Parameters:

    `component` |  |
    `newValue` |  |

  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.SetContentFieldValue(Object, Object)`

### _setFontSizeOnCK

`private Object _setFontSizeOnCK(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### UpdateValue

`protected Object UpdateValue()`
  Return:
    `Object`
  Overrides:
    `AdfDhtmlRichTextEditorBasePeer.UpdateValue()`

SUMMARY: FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.