Orielton
Orielton

Reputation: 45

CKEditor - display table without Table button in toolbar?

Is there any way to show tables in CKEditor (inline div if possible) without having the Table toolbar button displayed?

It worked just fine in a textarea in FCKEditor, but I'm trying to move on to the current version. When I remove the Table toolbar button, the table briefly shows and then all table tags are removed. I'm just left with any text that was in the table. I did find Ckeditor removes table tags but that just mentions the change in functionality.

Upvotes: 1

Views: 1203

Answers (2)

molymp
molymp

Reputation: 1

We have the full table functionality available but do not use the Table button, too. It is removed by

config.removeButtons = 'Table';

We do not want users to just add tables from scratch. If a user wants to add a new table, we provide some templates. We made a small custom plugin for that.

Upvotes: 0

Necreaux
Necreaux

Reputation: 9786

You are hitting the content filtering functionality. Since the table toolbar button is not there, it assumes the tables should be filtered out. You can verify this by disabling content filtering:

config.allowedContent = true;

See the CKEditor for more information on this functionality so you can fine tune it better to your needs:

http://docs.ckeditor.com/#!/guide/dev_acf

Upvotes: 2

Related Questions