Sha256: 7ef1f86d3e91e57f74d6a82172856cf419adeadbff67a3e0255d87afd910ccad

Contents?: true

Size: 771 Bytes

Versions: 1

Compression:

Stored size: 771 Bytes

Contents

$(document).ready(function(){
  $('textarea').each(function(i, elem) {
    $(elem).wysihtml5({
      html: true,
      locale: "nl-NL",
      "events": {
        "load": function() {
          editor = $('#insertable').data("wysihtml5").editor;
          editor.focus();
        }
      }
    });
  });

  $(".insert_image").click(function(e){
    e.preventDefault();
    console.log($(this).data("insertImage"));
    editor.composer.commands.exec("insertImage", { src: $(this).data("insertImage") });
  });

  $(".insert_link").click(function(e){
    e.preventDefault();
    console.log($(this).data());
    editor.composer.commands.exec("createLink", { href: $(this).data("insertUrl"), target: "_blank", rel: "nofollow", text: $(this).data("insertName") });
  });

});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brightcontent-core-2.0.16 app/assets/javascripts/brightcontent/main.js