MindTouch JavaScript API

    !!! Note !!!: this pages is a spec.  The objects and functions described below do not currently exist.

    MindTouch.Deki

    The MindTouch.Deki namespace contains functions for interacting with the MindTouch Deki API (i.e. the wiki engine).

    Reload(dom ,params, callback)

    dom : (*)

    MISSING

    params : object

    MISSING

    callback : (*)

    MISSING

    CreatePageProperty(page_api, name, value, success, error)

    page_api : string

    MISSING

    name : string

    Fully qualified property name with namespace prefix.

    value : (*)

    New property value to store.  

    (string) The string value is stored as text/plain.

    (object) The object value is converted to a JSON string and stored as application/json.

    success : (*)

    Callback when operation is successful.  The callback takes one result object argument: { etag: property_etag, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    error : (*)

    Callback when operation encounters an error.  The callback takes one result object argument: { status: http_status_code, text: http_status_message, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    ReadPageProperty(page_api, name, success, error)

    CreateProperty(properties_api, name, value, success, error)

    properties_api : string

    MISSING

    name : string

    Fully qualified property name with namespace prefix.

    value : (*)

    New property value to store.  

    (string) The string value is stored as text/plain.

    (object) The object value is converted to a JSON string and stored as application/json.

    success : (*)

    Callback when operation is successful.  The callback takes one result object argument: { etag: property_etag, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    error : (*)

    Callback when operation encounters an error.  The callback takes one result object argument: { status: http_status_code, text: http_status_message, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    ReadProperty(properties_api, name, success, error)

    name : string

    Fully qualified property name with namespace prefix.

    success : (*)

    Callback when operation is successful.  The callback takes one result object argument: { value: property_value, href: property_href, etag: property_etag, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    error : (*)

    Callback when operation encounters an error.  The callback takes one result object argument: { status: http_status_code, text: http_status_message, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    UpdateProperty(property_api, value, etag, success, error)

    name : string

    Fully qualified property name with namespace prefix.

    value : (*)

    New property value to store.  

    (string) The string value is stored as text/plain.

    (object) The object value is converted to a JSON string and stored as application/json.

    success : (*)

    Callback when operation is successful.  The callback takes one result object argument: { etag: property_etag, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    error : (*)

    Callback when operation encounters an error.  The callback takes one result object argument: { status: http_status_code, text: http_status_message, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    DeleteProperty(property_api, success, error)

    property_api : string

    MISSING

    success : (*)

    Callback when operation is successful.  The callback takes one result object argument: { xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    error : (*)

    Callback when operation encounters an error.  The callback takes one result object argument: { status: http_status_code, text: http_status_message, xhr: xml_http_request_object }.

    (function) Function to invoke with the result object.

    (string) Name of the channel on which to publish the result object.

    MindTouch.Web

    The MindTouch.Web namespace contains functions for doing RESTful web-service calls.

    Get(uri, headers, callback)

    MISSING

    Post(uri, value, mimetype, headers, callback)

    MISSING

    Put(uri, value, mimetype, headers, callback)

    MISSING

    Delete(uri, headers, callback)

    MISSING

    Other MindTouch functions found in mindtouch.util.js

    NOTE: these functions MUST be renamed to fit with the overall naming conventions of the MindTouch JavaScript library.

    • Deki.url
    • Deki.url.encode
    • Deki.util
    • Deki.util.Dom
    • Deki.util.Dom.getDimensions
    • Deki.util.Dom.getText
    • Deki.util.Dom.setInnerHTML
    • Deki.util.Dom.setInnerText
    • Deki.publish
    • Deki.subscribe
    • Deki._query_store
    • Deki.query
    • Deki.hasValue
    • Deki.Editor
    • Deki.LoadEditor
    Tag page
    Viewing 3 of 3 comments: view all
    whats the status on this?
    Posted 20:18, 29 Jun 2010
    When we are out of the context of the current page (in a template), i've used "page_api" parameter (usually set to null) with CreatePageProperty() & ReadPageProperty() functions (in Olympic 10.0.5):
    > var pageapi=Deki.BaseHref+'/@api/deki/pages/'+Deki.PageId;
    happy sharing :) edited 05:23, 29 Jan 2011
    Posted 05:04, 29 Jan 2011
    Another way is updating "PageApi" from "Deki.Env", without using "page_api" parameter:
    > Deki.Env.PageApi=Deki.BaseHref+'/@api/deki/pages/'+Deki.PageId;
    happy sharing :) edited 05:23, 29 Jan 2011
    Posted 05:19, 29 Jan 2011
    Viewing 3 of 3 comments: view all
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by