script: prosemirror config
(function() {
  var prosemirrorContent;

  wagn.addEditor('.prosemirror-editor', function() {
    return wagn.initProseMirror(this[0].id);
  }, function() {
    return prosemirrorContent(this[0].id);
  });

  $.extend(wagn, {
    setProseMirrorConfig: function(string) {
      var setter;
      setter = function() {
        try {
          return $.parseJSON(string);
        } catch (error) {
          return {};
        }
      };
      return wagn.proseMirrorConfig = setter();
    },
    initProseMirror: function(el_id) {
      var conf, hard_conf, user_conf;
      conf = {
        menuBar: true,
        tooltipMenu: false
      };
      hard_conf = {
        docFormat: "html"
      };
      user_conf = wagn.proseMirrorConfig != null ? wagn.proseMirrorConfig : {};
      $.extend(conf, user_conf, hard_conf);
      return createProseMirror(el_id, conf);
    }
  });

  prosemirrorContent = function(id) {
    var content;
    content = getProseMirrorContent(id);
    if (content === '<p></p>') {
      return '';
    }
    return content;
  };

}).call(this);

All Cards on This Page

 

Journals

2110 medium
Full list of journal entries