MsgEditApi

allows to use simple function calls to create and edit messages. Currently supported: article comments, blogs, forum threads and message wall threads (which technically are forum threads).

Usage
When ready, the script fires nmsgeditapi.ready hook via mw.hook, with interface object as first parameter. Exports: getMessage, setMessage, settings. Note: in order to remove headache with dealing with weird RTE content, setMessage turns editor to source mode.
 * getMessage: get active message content.
 * setMessage(msg): set active message content to "msg", if no active message found, add new message.
 * settings: currrently, only "debug" parameter is exposed.

Example
mw.hook('nmsgeditapi.ready').add(function (editApi) {   editApi.setMessage(editApi.getMessage + ' hi there'); });