Open nfriend21 opened 9 years ago
Hey,
i was trying to implement this plugin on redactor version 10.2.3. I was able to get it to work by modifying the plugin code a bit. Now everything is working fine. If you need my source file just say so !
Dude. Always add your code. Let us know what you modified.
Sorry had not seen your comment. Here are my js file so you can try if it works for you. The issue was that we were using an old version of redactor and their plugin is based on the new Redactor version.
So i changed the call to some of the Redactor core functions. diff_table.txt table.js.txt
@morgan-blondellet @nfriend21 Hi, thanks so much for this! You've gotten me one step closer, but I'm still unable to get the table button to properly display the table dropdown menu options. Could either of you point me in the right direction?
@jennycodes I guess you have no translation for the dropdown options. In my table.js file i added
langs: {
en: {
"table": "Table",
"insert-table": "Insert table",
"insert-row-above": "Insert row above",
"insert-row-below": "Insert row below",
"insert-column-left": "Insert column left",
"insert-column-right": "Insert column right",
"add-head": "Add head",
"delete-head": "Delete head",
"delete-column": "Delete column",
"delete-row": "Delete row",
"delete-table": "Delete table"
}
},
I also included a translation file from redactor : https://imperavi.com/redactor/docs/languages/
In this localized file i added and translated the previous keys in my language (french)
"insert-table": "Inserer un tableau",
"insert-row-above": "Insérer une ligne au dessus",
"insert-row-below": "Insérer une ligne en dessous",
"insert-column-left": "Insérer une colonne à gauche",
"insert-column-right": "Insérer une colonne à gauche",
"add-head": "Ajouter une entête",
"delete-head": "Supprimer l'entête",
"delete-column": "Supprimer la colonne",
"delete-row": "Supprimer la ligne",
"delete-table": "Supprimer le tableau",
Hope it helps !
@morgan-blondellet Hi, thank you for getting back to me! I do have the dropdown options listed in my table.js file and do not need translations because I am using English.
Ahh, wait - I just realized that you are using Redactor version 10.2.3. I am using Redactor version 10.0.4, the same version as the redactor-rails gem. I'm not sure what to do now, so I guess I will give up the idea of allowing tables in my WYSIWYG.
Thanks anyways for your help! :)
Is it possible to add non-default plugins? I have tried everything, cant get it to work. Here's what I've done (let's use the "table" plugin as an example):
The table button is appearing, but the dropdown menu list is empty (there are rows but no text is showing), and there's an error when I click on the first row to insert a table. The error is:
Thanks!