text: (function() {
    $(function() {
      var $preview, editor, mobileToolbar, toolbar;
      Simditor.locale = 'zh-CN';
      toolbar = ['title', 'bold', 'italic', 'underline', 'fontScale', 'color', '|', 'ol', 'ul', '|', 'alignment'];
      mobileToolbar = ["bold", "underline", "strikethrough", "color", "ul", "ol"];
      if (mobilecheck()) {
        toolbar = mobileToolbar;
      }
      editor = new Simditor({
        textarea: $('#txt-content'),
        placeholder: '请输入内容...',
        toolbar: toolbar,
        pasteImage: true,
        defaultImage: 'assets/images/image.png',
        upload: location.search === '?upload' ? {
          url: '/upload'
        } : false
      });
      $preview = $('#preview');
      if ($preview.length > 0) {
        return editor.on('valuechanged', function(e) {
          return $preview.html(editor.getValue());
        });
      }
    });
  
  }).call(this);
  