An Aloha editable class binding.
Note that the context and event you pass here are NOT automatically
retained by this class, if you want this to happen you must retain it
in your client code. The main Aloha class for instance retains all proxies it
uses to instantiate this class.
The event that triggered the creation of the editable, e.g
the event from editableActivatedEvent. This is optional for this
class but if not supplied some API calls will throw an exception.
Get the contents of this editable as a HTML string or child node DOM
objects.
Boolean asObject Whether or not to retreive the contents of
this editable as child node objects or as an HTML string.
Defaults to string .
return {string|jQuery.HTMLElement} Contents of the editable as
a DOM object or an HTML string.
Remove placeholder from the content. If setCursor is true,
will also set the cursor to the start of the selection. However,
this will be ASYNCHRONOUS, so if you rely on the fact that
the placeholder is removed after calling this method, setCursor
should be false ( or not set )
Sets the content serializer function.
The default content serializer will just call the jQuery.html()
function on the editable element (which gets the innerHTML property).
This method is a static class method and will affect the result
of editable.getContents() for all editables that have been or
will be constructed.
Dynamic serializerFunction
A function that accepts a DOM element and returns the serialized
XHTML of the element contents (excluding the start and end tag of
the passed element).
js.Proxy context, the aAloha editable context ,usually Aloha.Editable