Sha256: b96c677a2baca2d94dd91fc452bc5d7d9aea77b254fd8e73c69fce2a9e60eb29

Contents?: true

Size: 1016 Bytes

Versions: 3

Compression:

Stored size: 1016 Bytes

Contents

// Select each textarea with the class picco_blog_editor and add SimpleMDE editor

$(document).ready(function() {
  $('textarea.picco_blog_editor').each(function() {
      var simplemde = new SimpleMDE({
          element: this,
          toolbar: [
            "bold", "italic", "heading", "strikethrough", "|",
            "quote", "unordered-list", "ordered-list", "|",
            "link", "image", "table", "horizontal-rule", "|",
            "preview", "side-by-side", "fullscreen", "|", "guide"
          ],
          insertTexts: {
            horizontalRule: ["", "\n\n-----\n\n"],
            image: ["![](http://", ")"],
            link: ["[", "](http://)"],
            table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text      | Text     |\n\n"],
          },
          status: false
      });
      simplemde.render(); 
  });

  if($("#post_tag_list").length) {
    $("#post_tag_list").tagit({
        availableTags: available_tags
    });
  }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picco_blog-1.4.3 app/assets/javascripts/picco_blog/posts.js
picco_blog-1.4.2 app/assets/javascripts/picco_blog/posts.js
picco_blog-1.4.1 app/assets/javascripts/picco_blog/posts.js