We use cookies to make our website more effective. By using our website you agree to our privacy policy.

Namespace: aloha

aloha

Aloha Editor API root.

Members

editor.editablesArray.<Editable>

Editables.

editor.selectionSelection

Volatile selection context object.

editor.stackArray.<function(AlohaEvent): AlohaEvent>

Aloha Editor stack.

Aloha Editor’s aloha.editor.stack uses the middleware pattern to thread a
browser event through a series of ordered functions called handlers. Each
handler receives an event (a map of properties), operates on it, and
returns an potentially modified version of that object.

Order matters.

It is important to remember that when it comes to middleware order
matters. Middlewares that depend on particular properties to be in the
event object, need to be ordered after middleware that provide those
required properties. e.g.: handleKeys must be ordered before
handleTyping.

Where’s the `next()` argument?

Unlike other middleware implementations, Aloha Editor’s does not require
calling a next() function to continue the execution of the middlewares
function chain. This is because aloha.editor.middleware, assume
synchronous execution for the purpose of processing editing events.

Methods

aloha(element){Editable}

Transforms the given element into an Aloha editable region.
Name Type Description
element Element

editor(nativeEvent, event)

Editor function/namespace.

This is where state is surfaced.
Name Type Description
nativeEvent Event
event AlohaEvent

mahalo(element){Editable}

Destroys an editable.
Name Type Description
element Element
comments powered by Disqus