(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 1 && arguments[1] !== undefined ? arguments[1] : 90; if (string.length <= limit) { return string; } else { return string.substring(0, limit) + "..."; } } if (!ignoreTextChange) { if (workingNote) { // Be sure to capture this object as a variable, as this.note may be reassigned in `streamContextItem`, so by the time // you modify it in the presave block, it may not be the same object anymore, so the presave values will not be applied to // the right object, and it will save incorrectly. var note = workingNote; componentManager.saveItemWithPresave(note, function () { lastValue = window.easymde.value(); var html = window.easymde.options.previewRender(window.easymde.value()); var strippedHtml = truncateString(strip(html)); note.content.preview_plain = strippedHtml; note.content.preview_html = null; note.content.text = lastValue; }); } } }); }); },{}]},{},[1]);