Sha256: 5c0f060a9cf05bde53f7000a921f8a5a378312e25af1bbaac2dea5f39cb00c09

Contents?: true

Size: 924 Bytes

Versions: 1

Compression:

Stored size: 924 Bytes

Contents

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

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

  $("#attachments").on("click", ".insert_link", 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.31 app/assets/javascripts/brightcontent/main.js