TinyMCE: Add a table button

rated by 0 users
This post has 9 Replies | 4 Followers

J-O Eriksson
Top 25 Contributor
Posts 1,127
Points 34,945
MVPs
By: J-O Eriksson
Posted: Sat, Oct 21 2006 6:20 PM

Has anyone managed to add a button for inserting tables to the tinyMCE editor in CS and got it to work?

I have done the following to try to get it to work:

  1. Download the tinyMCE from their website and copy the table plugin to tinymce\jscripts\tiny_mce\plugins
  2. Opened and edited the Skin-Editor-Enhanced.ascx, and added the table plugin to
    <TMCE:TinyMCEOption runat="server" Name="plugins" Value="'contentselector,paste,table,smilies,iespell'" />
  3. Added the tablecontrols to one of the toolbars
    <TMCE:TinyMCEOption runat="server" Name="theme_advanced_buttons2" Value="'bold,italic,underline,strikethrough,separator,tablecontrols,indent,outdent,separator,bullist,numlist,separator,link,unlink,image,
    contentselector,smiley'" />
     
  4. Made sure my profile was set to enhanced editor.

But no table button shows.

If I remove one of the other buttons, like pasteword, that button disappears, so it seems I am in the right file.

I've tried to look through the .JS files of the tinyMCE, but as far as I can understand nothing should have to be added to there?

J-O

J-O Eriksson's blog
 
  • Filed under: |
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Tue, Oct 24 2006 4:03 PM In reply to

I followed these steps with a clean CS2.1 installation and the table controls rendered and functioned.

Is the table/ sub-folder (and files) in the plugins/ folder accessible to the web?

Ben Tiedt's Blog

 
  • Post Points: 20 |
J-O Eriksson
Top 25 Contributor
Posts 1,127
Points 34,945
MVPs
By: J-O Eriksson
Posted: Tue, Oct 24 2006 4:34 PM In reply to

They should be since they are located under the /tiny_mce/jscripts/tiny_mce/plugins/ folder. I created a sub-folder there called table and copied the table plugin files to there.

And you just did the steps I describe in my previous post?

J-O

J-O Eriksson's blog
 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Tue, Oct 24 2006 4:39 PM In reply to

I copied the table folder from my base installation of TinyMCE (I downloaded TinyMCE a while ago) and my CS installation was with SP1 but otherwise, yes, I performed just the steps you mentioned.

I've attached my copy of the table plugin.  Perhaps the older version works but the new one doesn't.

Ben Tiedt's Blog

 
  • Post Points: 20 |
J-O Eriksson
Top 25 Contributor
Posts 1,127
Points 34,945
MVPs
By: J-O Eriksson
Posted: Tue, Oct 24 2006 5:11 PM In reply to

Thanks Ben!!

It worked with your version of the table plugin (which ever it now was). I had recently downloaded version 2.0.7, and appearently that one doesn't work. Which version of TinyMCE does CS 2.1 come with?

J-O

J-O Eriksson's blog
 
  • Post Points: 5 |
J-O Eriksson
Top 25 Contributor
Posts 1,127
Points 34,945
MVPs
By: J-O Eriksson
Posted: Tue, Oct 24 2006 5:17 PM In reply to
Had a look in one of the .JS files of TinyMCE in CS, and it seems to be 2.0.6.1
J-O

J-O Eriksson's blog
 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
Posts 3,338
Points 63,050
CS Developers
By: Ben Tiedt
Posted: Tue, Oct 24 2006 8:33 PM In reply to

Yes, 2.0.6.1 with a few modifications (marked with comments)

Ben Tiedt's Blog

 
  • Post Points: 20 |
Daniel Rae
Top 75 Contributor
Posts 285
Points 3,935
By: Daniel Rae
Posted: Mon, Jun 23 2008 7:55 AM In reply to

I've managed to do this in CS2007, but some how ended up with two table buttons. Now I can't find the file where you can edit what apepars in TinyMCE and what does not... any ideas which file it is in CS2007?

 
  • Post Points: 20 |
Daniel Rae
Top 75 Contributor
Posts 285
Points 3,935
By: Daniel Rae
Posted: Mon, Jun 23 2008 10:37 AM In reply to

d'oh, so it is!

 

Cheers!

 
  • Post Points: 5 |
Page 1 of 1 (10 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com