Jump to content

Add drop down to editor


ibaker
 Share

Recommended Posts

I have a need to include the ability to create tables and manage them in the editor. I have found the plugins for it on the ckeditor site however there are so many buttons needed that it takes up an entire large editor toolbar width. What I was hoping is that someone could tell me how I could create 1 button for Tables that when clicked drops down showing all the table buttons .

This is what I have now and I would much prefer to have all those buttons on the 3rd toolbar as a drop down from a single button on the 2nd toolbar:

1.jpg.4cb4e9de8d420ecddd7b8e5dfaff7dde.jpg

Link to comment
Share on other sites

24 minutes ago, GlenP said:

That looks like the Table Tools Toolbar plugin.

It is indeed.

@ibaker - if you want to get your hands dirty, and know JS, then the item to look at in the CKEditor API is addMenuGroup, which will allow you create a menu group. You'd then have to modify the plugin.js file of the plugin itself to change things around from the existing editor.ui.addButton calls to the addMenuGroup structure.

I'll see if I can find an example of the above for reference.

Here you go..... http://jsfiddle.net/oleq/vmYCF/

I think the above suggestion about the additional plugin to move things to the right-click action would be the better move though.

Edited by Nathan Explosion
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...