Javascript for Episerver 7.5 cms

TinyMCEInlineEditor

Location

epi-cms/contentediting/editors/TinyMCEInlineEditor

Extends

Properties

_aspectAfterHandler

Return object from aspect after method.

_attrPairNames

_blankGif

Path to a blank 1x1 image. Used by <img> nodes in templates that really get their image via CSS background-image.

_earlyTemplatedStartup

A fallback to preserve the 1.0 - 1.3 behavior of children in templates having their startup called before the parent widget fires postCreate. Defaults to 'false', causing child widgets to have their .startup() called immediately before a parent widget .startup(), but always after the parent .postCreate(). Set to 'true' to re-enable to previous, arguably broken, behavior.

_editorIframe

_focusManager

_setClassAttr

_setDirAttr

_setIdAttr

_setLangAttr

_skipNodeCache

_started

startup() has completed.

active

True if mouse was pressed while over this widget, and hasn't been released yet

attributeMap

Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute for each XXX attribute to be mapped to the DOM.

attributeMap sets up a "binding" between attributes (aka properties) of the widget and the widget's DOM. Changes to widget attributes listed in attributeMap will be reflected into the DOM.

For example, calling set('title', 'hello') on a TitlePane will automatically cause the TitlePane's DOM to update with the new title.

attributeMap is a hash where the key is an attribute of the widget, and the value reflects a binding to a:

  • DOM node attribute

    focus: {node: "focusNode", type: "attribute"} Maps this.focus to this.focusNode.focus

  • DOM node innerHTML

    title: { node: "titleNode", type: "innerHTML" } Maps this.title to this.titleNode.innerHTML

  • DOM node innerText

    title: { node: "titleNode", type: "innerText" } Maps this.title to this.titleNode.innerText

  • DOM node CSS class

    myClass: { node: "domNode", type: "class" } Maps this.myClass to this.domNode.className

If the value is an array, then each element in the array matches one of the formats of the above list.

There are also some shorthands for backwards compatibility:

  • string --> { node: string, type: "attribute" }, for example:
"focusNode" ---> { node: "focusNode", type: "attribute" }
  • "" --> { node: "domNode", type: "attribute" }

autoResizable

States if the editor can be resized while text is added.

baseClass

The widget's base CSS class.

baseDndStateClass

CSS base class for dnd state.

class

componentGutter

The external component's gutter

containerNode

Designates where children of the source DOM node will be placed. "Children" in this case refers to both DOM nodes and widgets. For example, for myWidget:

<div data-dojo-type=myWidget>
    <b> here's a plain DOM node
    <span data-dojo-type=subWidget>and a widget</span>
    <i> and another plain DOM node </i>
</div>

containerNode would point to:

<b> here's a plain DOM node
<span data-dojo-type=subWidget>and a widget</span>
<i> and another plain DOM node </i>

In templated widgets, "containerNode" is set via a data-dojo-attach-point assignment.

containerNode must be defined for any widget that accepts innerHTML (like ContentPane or BorderContainer or even Button), and conversely is null for widgets that don't, like TextBox.

cssStateNodes

List of sub-nodes within the widget that need CSS classes applied on mouse hover/press and focus

Each entry in the hash is a an attachpoint names (like "upArrowButton") mapped to a CSS class names (like "dijitUpArrowButton"). Example:

{
    "upArrowButton": "dijitUpArrowButton",
    "downArrowButton": "dijitDownArrowButton"
}

The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it

is hovered, etc.

dir

Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's default direction.

dirtyCheckInterval

How often should the widget check if it is dirty and raise onChange event, in milliseconds. The value is by default set to 2000 ms

dndStateClass

CSS class for current state

domNode

This is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's data-dojo-attach-point syntax, but the domNode property is the canonical "top level" node in widget UI.

dropTarget

focused

This widget or a widget it contains has focus, or is "active" because it was recently clicked.

height

The editor height.

hovering

True if cursor is over this widget

id

A unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.

inlineSettings

The inline editor settings.

intermediateChanges

Fires onChange for each value change or only on demand

isLayoutContainer

Indicates that this widget is going to call resize() on its children widgets, setting their size, when they become visible.

isResized

Indicates if the widget has been already resized on its initialization.

isShowingChildDialog

Indicates whether a child dialog window is currently being displayed.

lang

Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the HTML LANG attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to RFC 3066 (like en-us).

missingMessage

ownerDocument

The document this widget belongs to. If not specified to constructor, will default to srcNodeRef.ownerDocument, or if no sourceRef specified, then to dojo/_base/window::doc

readOnly

Denotes that the editor is read only.

required

settings

The editor settings.

srcNodeRef

pointer to original DOM node

style

HTML style attributes as cssText string or name/value hash

supportCustomDnd

Indicates that the current editor had custom Dnd handler or not

templatePath

Path to template (HTML file) for this widget relative to dojo.baseUrl. Deprecated: use templateString with require([... "dojo/text!..."], ...) instead

templateString

Template for the widget.

textDir

Bi-directional support, the main variable which is responsible for the direction of the text. The text direction can be different than the GUI direction by using this parameter in creation of a widget.

Allowed values:

  1. "ltr"
  2. "rtl"
  3. "auto" - contextual the direction of a text defined by first strong letter.

By default is as the page direction.

tinymceRendered

title

HTML title attribute.

For form widgets this specifies a tooltip to display when hovering over the widget (just like the native HTML title attribute).

For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, etc., it's used to specify the tab label, accordion pane title, etc.

tooltip

When this widget's title attribute is used to for a tab label, accordion pane title, etc., this specifies the tooltip to appear when the mouse is hovered over that text.

value

The editor content.

width

The editor width.

Methods

protected method _clearLocalDefers ( )

Clear all registered local defers


protected method _fillContent ( source )

Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.

Parameters

protected method _onBlur ( )

Disable default onblur event


public inherited method _onChange ( val )

Raised when the editor's content is changed.

Parameters

protected method _onFocus ( )

This is where widgets do processing for when they are active, such as changing CSS classes. See onFocus() for more details.


protected method _setStyleAttr ( value )

Sets the style attribute of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string

Parameters

protected method _setupChild ( child )

Common setup for initial children and children which are added after startup

Parameters

protected method _stopEditing ( )

Stop editor editing function


protected method applyTextDir ( element , text )

The function overridden in the _BidiSupport module, originally used for setting element.dir according to this.textDir. In this case does nothing.

Parameters

protected method connect ( obj , event , method )

Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.

Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy.

Provide widget-specific analog to dojo.connect, except with the implicit use of this widget as the target object. Events connected with this.connect are disconnected upon destruction.

Parameters
Examples
var btn = new Button();
// when foo.bar() is called, call the listener we're going to
// provide in the scope of btn
btn.connect(foo, "bar", function(){
    console.debug(this.toString());
});

protected method defer ( fcn , delay )

Wrapper to setTimeout to avoid deferred functions executing after the originating widget has been destroyed. Returns an object handle with a remove method (that returns null) (replaces clearTimeout).

Parameters

protected method destroyRendering ( preserveDom )

Destroys the DOM nodes associated with this widget

Parameters

protected method disconnect ( handle )

Deprecated, will be removed in 2.0, use handle.remove() instead.

Disconnects handle created by connect.

Parameters

protected method emit ( type , eventObj , callbackArgs )

Used by widgets to signal that a synthetic event occurred, ex:

myWidget.emit("attrmodified-selectedChildWidget", {}).

Emits an event on this.domNode named type.toLowerCase(), based on eventObj. Also calls onType() method, if present, and returns value from that method. By default passes eventObj to callback, but will pass callbackArgs instead, if specified. Modifies eventObj by adding missing parameters (bubbles, cancelable, widget).

Parameters

public method focus ( )

Set focus on the current editor.


public inherited method getComponentInfo ( )

Get the external component related information


public inherited method getEditor ( )

Return an editor instance.


public inherited method getEditorDOM ( )

Get active editor DOM object


protected method getTextDir ( text , originalDir )

Return direction of the text. The function overridden in the _BidiSupport module, its main purpose is to calculate the direction of the text, if was defined by the programmer through textDir.

Parameters

public method isEditing ( )

Check the current editor widget is on editing or not


protected method isLeftToRight ( )

Return this widget's explicit or implicit orientation (true for LTR, false for RTL)


public inherited method onBlur ( )

Called when the widget stops being "active" because focus moved to something outside of it, or the user clicked somewhere outside of it, or the widget was hidden.


public inherited method onClick ( event )

Connect to this function to receive notifications of mouse click events.

Parameters

public inherited method onClose ( )

Called when this widget is being displayed as a popup (ex: a Calendar popped up from a DateTextBox), and it is hidden. This is called from the dijit.popup code, and should not be called directly.

Also used as a parameter for children of dijit/layout/StackContainer or subclasses. Callback if a user tries to close the child. Child will be closed if this function returns true.


public inherited method onComponentFloat ( componentFloatInfo )

Parameters

public inherited method onDblClick ( event )

Connect to this function to receive notifications of mouse double click events.

Parameters

public method onEditorBlur ( evt )

Stop editing when click outside editor but inside its viewport

Parameters

public inherited method onEditorRemoved ( ed )

Raised when a instance of the editor is removed.

Parameters

public method onEditorResized ( callbackFunction )

Stub to do something when the current editor finished its resizing process

Parameters

public method onEditorResizing ( resizeInfo )

Stub to do something when the current editor on resizing progress

Parameters

public inherited method onFocus ( )

Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.


public inherited method onHide ( )

Called when another widget becomes the selected pane in a dijit/layout/TabContainer, dijit/layout/StackContainer, dijit/layout/AccordionContainer, etc.

Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane.


public inherited method onKeyDown ( event )

Connect to this function to receive notifications of keys being pressed down.

Parameters

public inherited method onKeyPress ( event )

Connect to this function to receive notifications of printable keys being typed.

Parameters

public inherited method onKeyUp ( editor , e )

Raised when a keyboard key is released on the editor.

Parameters

public inherited method onMouseDown ( event )

Connect to this function to receive notifications of when the mouse button is pressed down.

Parameters

public inherited method onMouseEnter ( event )

Connect to this function to receive notifications of when the mouse moves onto this widget.

Parameters

public inherited method onMouseLeave ( event )

Connect to this function to receive notifications of when the mouse moves off of this widget.

Parameters

public inherited method onMouseMove ( event )

Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.

Parameters

public inherited method onMouseOut ( event )

Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.

Parameters

public inherited method onMouseOver ( event )

Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.

Parameters

public inherited method onMouseUp ( event )

Connect to this function to receive notifications of when the mouse button is released.

Parameters

public inherited method onRedo ( ed , level )

Raised by the redo event.

Parameters

public inherited method onSetContent ( ed )

Raised when the content is set to the editor.

Parameters

public inherited method onShow ( )

Called when this widget becomes the selected pane in a dijit/layout/TabContainer, dijit/layout/StackContainer, dijit/layout/AccordionContainer, etc.

Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane.


public inherited method onUndo ( ed , level )

Raised undo event.

Parameters

protected method own ( )

Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.


protected method postCreate ( )

Load the tinyMCE dependencies and initialize the editor.


public method resizeEditor ( )

Resizes the editor area.


public inherited method setAttribute ( attr , value )

Deprecated. Use set() instead.

Parameters

protected method subscribe ( t , method )

Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.

Subscribes to the specified topic and calls the specified method of this object and registers for unsubscribe() on widget destroy.

Provide widget-specific analog to dojo.subscribe, except with the implicit use of this widget as the target object.

Parameters
Examples
var btn = new Button();
// when /my/topic is published, this button changes its label to
// be the parameter of the topic.
btn.subscribe("/my/topic", function(v){
    this.set("label", v);
});

protected method uninitialize ( )

Deprecated. Override destroy() instead to implement custom widget tear-down behavior.


protected method unsubscribe ( handle )

Deprecated, will be removed in 2.0, use handle.remove() instead.

Unsubscribes handle created by this.subscribe. Also removes handle from this widget's list of subscriptions

Parameters