/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS */
(function (window, rJS) {
  "use strict";

  rJS(window)

    .declareAcquiredMethod("saveContent", "editor_saveContent")
  
    .declareMethod('render', function (options) {
    if (options && options.hasOwnProperty("value"))
		this.props.element.querySelector("textarea").value = options.value || "";
  })

    .declareMethod('getContent', function () {
    return this.props.element.querySelector("textarea").value;
  })

    .ready(function (g) {
    g.props = {};
    return g.getElement()
      .push(function (element) {
      g.props.element = element;
    });

  });
}(window, rJS));