Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to insert table #143

Open
suramai opened this issue May 27, 2015 · 3 comments
Open

Not able to insert table #143

suramai opened this issue May 27, 2015 · 3 comments

Comments

@suramai
Copy link

suramai commented May 27, 2015

Hi,

I am not able to add tables.

When I Click Insert in the Insert table dialog box, I get the following error in the developer tools console.

Uncaught TypeError: this.clean.cleanEmptyParagraph is not a functioninsert @ 
table-adf5bb1b75d1a60881de57550cc6686f.js?body=1:59jQuery.event.dispatch @ 
jquery-6a50177757f6c64493882fb7aae952c3.js?body=1:4642elemData.handle @ 
jquery-6a50177757f6c64493882fb7aae952c3.js?body=1:4310

The insert table dialog box remains open and nothing happens.
Why isn't the table getting inserted?
Kindly help.

This is my config.js

window.init_redactor = function(){
  var csrf_token = $('meta[name=csrf-token]').attr('content');
  var csrf_param = $('meta[name=csrf-param]').attr('content');
  var params;
  if (csrf_param !== undefined && csrf_token !== undefined) {
      params = csrf_param + "=" + encodeURIComponent(csrf_token);
  }
  $('.redactor').redactor({
        // You can specify, which ones plugins you need.
        // If you want to use plugins, you have add plugins to your
        // application.js and application.css files and uncomment the line below:
        // "plugins": ['fontsize', 'fontcolor', 'fontfamily', 'fullscreen', 'textdirection', 'clips'],
        focus: true,
        "buttons": ['html', 'formatting', 'bold', 'italic', 'deleted',
        'unorderedlist', 'orderedlist','alignment', 'outdent', 'indent', 'image',
        'video', 'link', 'table', 'horizontalrule'],
        "formatting": ['p', 'h1', 'h2', 'h3', 'h4', 'h5'],
        "plugins": ['fullscreen','video','table'],
        "imageUpload":"/redactor_rails/pictures?" + params,
        "imageGetJson":"/redactor_rails/pictures",
        // "fileUpload":"/redactor_rails/documents?" + params,
        // "fileGetJson":"/redactor_rails/documents",
        "path":"/assets/redactor-rails",
        "css":"style.css"
      });
}

$(document).on( 'ready page:load', window.init_redactor );

My application.js

//= require jquery
//= require jquery.turbolinks
//= require chosen-jquery
//= require jquery_ujs
//= require jquery.image-select
//= require users
//= require masonry/jquery.masonry
//= require bootstrap
//= require redactor-rails/redactor.min
//= require redactor-rails/config
//= require redactor-rails/video
//= require redactor-rails/table
//= require redactor-rails/plugins
//= require fitvids.js

I have the following files in the redactor-rails folder
config.js
table.js
video.js

Downloaded table.js , video.js from http://imperavi.com/redactor/plugins/

@nfriend21
Copy link

I have the same problem. Cant get a single non-default plugin to work.

@morgan-blondellet
Copy link

Which version of redactor are you using ? I tried to add the table plugin on a redactor 10.2.3 and i was able to do so by modifiying the plugin a bit. If you want me to give you my js file just say so ;)

@morgan-blondellet
Copy link

See my answer to this other issue. It may help !

#156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants