Sha256: 7fdb0c0a6482f4611050b20750ca3222c2e8c45ab7276b33cda1fb8549b77acd

Contents?: true

Size: 924 Bytes

Versions: 8

Compression:

Stored size: 924 Bytes

Contents

$(function() {
  var attributeOptions, element, finalOptions, options, overrides;
  element = $(".sir_trevor_editor");
  if (element.length > 0) {
    attributeOptions = JSON.parse($(element[0]).attr("data-sir-trevor"));

    options = {
      el: element,
      localStorage: true,
      placeholder: element.attr("placeholder"),
      blockTypes: [
        'Heading',
        'Text',
        'List',
        'Quote',
        'ExtendedQuote',
        'Definition',
        'Divider',
        'ExtendedTweet',
        'FacebookPost',
        'ExtendedImage',
        'Audio',
        'Video',
        'Html',
        'Instagram'
      ]
    };

    overrides = {
      uploadUrl: attributeOptions["uploadUrl"],
      defaultType: 'text',
      escapeHTML: true
    };

    SirTrevor.setDefaults(overrides);

    finalOptions = jQuery.extend(options, attributeOptions);
    return new SirTrevor.Editor(finalOptions);
  }
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
lady_josephine-0.7.0 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.6.3 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.6.2 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.6.1 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.6.0 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.5.0 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.0.4 app/assets/javascripts/lady_josephine/editor.js
lady_josephine-0.0.3 app/assets/javascripts/lady_josephine/editor.js