Sha256: 2a131cf54c749c63327fa241cad1b52a8caa19447b8fd636738559284f10c28b

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

$.fn.inputTextareaWysiwyg = function () {
  'use strict';

  this.trumbowyg({
    svgPath: '<%= asset_path("trumbowyg/icons.svg") %>',
    resetCss: true,
    removeformatPasted: true,
    autogrow: true,
    btnsDef: {
      align: {
        dropdown: ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
        ico: 'justifyLeft'
      },
      list: {
        dropdown: ['unorderedList', 'orderedList'],
        ico: 'unorderedList'
      },
      image: {
        dropdown: ['insertImage', 'base64', 'upload'],
        ico: 'insertImage'
      }
    },
    btns: [
      ['viewHTML'],
      ['formatting'],
      ['removeformat'],
      ['strong', 'em','del'],
      ['foreColor', 'backColor'],
      ['link'],
      ['image'],
      ['noembed'],
      ['align'],
      ['list']
    ],
    plugins: {
      upload: {
        serverPath: '/backend/assets/wysiwyg',
        fileFieldName: 'file',
        urlPropertyName: 'url'
      }
    }
  });

};

$(function() {
  'use strict';

  $('textarea.wysiwyg').inputTextareaWysiwyg();

});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
archangel-0.3.0 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.8 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.7 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.6 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.5 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.4 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.3 app/assets/javascripts/archangel/input/wysiwyg.js.erb
archangel-0.0.2 app/assets/javascripts/archangel/input/wysiwyg.js.erb