codox.init(config)
codox
instance has been created, you should initialize thecodox
instance with app specific configurations. The general structure of the config
JSON is as follows:app
(required)
string
docId
(required)
string
apiKey
(required)
string
user
(required)
object
editor
(required)
object
autoStart
(optional)
boolean
avatar
(optional)
object
showUI
(optional)
boolean
showCursor
(optional)
boolean
cursorAlwaysOn
(optional)
boolean
showPointer
(optional)
boolean
pointers
(optional)
object
hooks
(optional)
object
username
(deprecated)
string
app
string
'froala', 'quill', or 'tinymce'
docId
string
apiKey
string
user
Object
name
(optional)
string
email
(optional)
string
avatar
(optional)
url
id
(optional)
string
color
(optional)
string
avatar
field is a link to an image resource. If avatar
has a value specified, it will override the default solid background avatar implementation. color
can be any valid css color property value (e.g., 'red'
, '#00ff00'
, 'rgb(0, 0, 255)'
) . editor
Object
editor
the reference to the editor object. For TinyMCE, the plugin will pass in the editor object reference automatically. codox
instance is bound to a single editor
instance. If the editor is destroyed and recreated as part of some UI framework lifecycle events, then a new codox
object should be created with the new editor
instance.autoStart (optional)
boolean
true
to start co-editing immediately on call toinit(config)
. Set to false
to initialize but delay the start to co-editing (see the codox.start()
client API). true
.avatars (optional)
object
left
(optional)
boolean
vertical
(optional)
boolean
left
and vertical
both default to false
showUI (optional)
boolean
true
to show avatars for online users. Set to false
to hide the avatars. true
.showCursor (optional)
boolean
true
, to display cursor positions and selections for remote co-editing users. Set to false
to hide cursor positions and selections. true
.cursorAlwaysOn (optional)
boolean
true
to always show remote users' caret with username.false
showPointer (optional)
boolean
true
, to display pointer positions and click events of remote co-editing users. Set false
to hide pointers.false
.pointers (optional)
object
shape
(optional)
string
hooks
(optional)
object
username (optional)
string
username
is deprecated and will be removed in the next major release (v2). Please use the user
meta-data field.